[PATCH] contrib/workdir: create logs/refs and rr-cache in the origin repository
- From
Adeodato Simó <dato@net.com.org.es>
- Date
- Jan 17, 2009, 16:15 UTC
- Message-ID
- <1232208943-31756-1-git-send-email-dato@net.com.org.es>
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