From: Martin Waitz Date: Sun, 7 May 2006 18:18:53 +0000 (+0200) Subject: repack: honor -d even when no new pack was created X-Git-Tag: v1.3.3~16 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=178613c737f82489a1e2c387236731541fe19081;p=git.git repack: honor -d even when no new pack was created If all objects are reachable via an alternate object store then we still have to remove all obsolete local packs. Signed-off-by: Martin Waitz Signed-off-by: Junio C Hamano --- diff --git a/git-repack.sh b/git-repack.sh index a5d349fd0..20774fbd7 100755 --- a/git-repack.sh +++ b/git-repack.sh @@ -46,15 +46,15 @@ name=$(git-rev-list --objects --all $rev_list 2>&1 | exit 1 if [ -z "$name" ]; then echo Nothing new to pack. - exit 0 -fi -echo "Pack pack-$name created." +else + echo "Pack pack-$name created." -mkdir -p "$PACKDIR" || exit + mkdir -p "$PACKDIR" || exit -mv .tmp-pack-$name.pack "$PACKDIR/pack-$name.pack" && -mv .tmp-pack-$name.idx "$PACKDIR/pack-$name.idx" || -exit + mv .tmp-pack-$name.pack "$PACKDIR/pack-$name.pack" && + mv .tmp-pack-$name.idx "$PACKDIR/pack-$name.idx" || + exit +fi if test "$remove_redundant" = t then