From 178613c737f82489a1e2c387236731541fe19081 Mon Sep 17 00:00:00 2001 From: Martin Waitz Date: Sun, 7 May 2006 20:18:53 +0200 Subject: [PATCH] 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 --- git-repack.sh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/git-repack.sh b/git-repack.sh index a5d349fd..20774fbd 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 -- 2.11.0