git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] contrib/workdir: create logs/refs and rr-cache in the origin repository
@ 2009-01-17 16:15 Adeodato Simó
  2009-01-18  1:31 ` Junio C Hamano
  0 siblings, 1 reply; 6+ messages in thread
From: Adeodato Simó @ 2009-01-17 16:15 UTC (permalink / raw)
  To: git, gitster; +Cc: Adeodato Simó

If logs/refs or rr-cache are dangling symlinks in the workdir, and reflogs
and/or rerere are enabled, commit will die with "fatal: Could not create
directory". (In the case of rr-cache, it will die after having created the
commit.)

This commit just creates logs/refs and rr-cache in the origin repository if
they don't exist already.

Signed-off-by: Adeodato Simó <dato@net.com.org.es>
---
 contrib/workdir/git-new-workdir |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/contrib/workdir/git-new-workdir b/contrib/workdir/git-new-workdir
index 993cacf..a4e89d0 100755
--- a/contrib/workdir/git-new-workdir
+++ b/contrib/workdir/git-new-workdir
@@ -66,6 +66,12 @@ mkdir -p "$new_workdir/.git" || die "unable to create \"$new_workdir\"!"
 for x in config refs logs/refs objects info hooks packed-refs remotes rr-cache svn
 do
 	case $x in
+	logs/refs|rr-cache)
+		if [ ! -e "$git_dir/$x" ]; then
+			mkdir -p "$git_dir/$x"
+		fi
+	esac
+	case $x in
 	*/*)
 		mkdir -p "$(dirname "$new_workdir/.git/$x")"
 		;;
-- 
1.6.1.263.g35eb3c

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2009-01-19 19:50 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-17 16:15 [PATCH] contrib/workdir: create logs/refs and rr-cache in the origin repository Adeodato Simó
2009-01-18  1:31 ` Junio C Hamano
2009-01-18 11:38   ` Adeodato Simó
2009-01-18 19:59     ` Junio C Hamano
2009-01-19 12:20       ` Adeodato Simó
2009-01-19 19:48         ` Junio C Hamano

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).