From 279c8b05e3c3aeb10b4b1fa690d52100bdadc55d Mon Sep 17 00:00:00 2001 From: "Kyle J. McKay" Date: Tue, 26 Mar 2013 07:12:35 -0700 Subject: [PATCH] Make packed-refs a symbolic link to objects/info/packed-refs Move a pre-existing packed-refs to objects/info/packed-refs first being very careful to never step on anything. --- fixupd/fixup.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/fixupd/fixup.sh b/fixupd/fixup.sh index 5409b6b..db1e221 100755 --- a/fixupd/fixup.sh +++ b/fixupd/fixup.sh @@ -31,4 +31,13 @@ if [ -z "$gid" ]; then exit 1 fi +if ! [ -L packed-refs ]; then + if [ -f packed-refs ] && ! [ -f objects/info/packed-refs ]; then + mv packed-refs objects/info/packed-refs + fi + if ! [ -e packed-refs ]; then + ln -s objects/info/packed-refs packed-refs + fi +fi + chown -R "$mirror_user":"$gid" info refs packed-refs objects 2>&1 | (grep -v 'No such file or directory' || true) -- 2.11.4.GIT