DORMANTno replies

[PATCH] contrib/workdir: create logs/refs and rr-cache in the origin repository

From: Adeodato Simó <hidden>
Date: 2016-06-15 22:45:58
Subsystem: the rest · Maintainer: Linus Torvalds

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ó <redacted>
---
 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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help