@matheusbsbs / matheus-bagliano / commits / 178613c737
Fork 0

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 <tali@admingilde.org> Signed-off-by: Junio C Hamano <junkio@cox.net>

Martin Waitz committed May 7, 2006 at 20:18 UTC 178613c737f82489a1e2c387236731541fe19081
1 file changed +7 -7
git-repack.sh
+7 -7
@@ -46,15 +46,15 @@ name=$(git-rev-list --objects --all $rev_list 2>&1 |
46 exit 1
47 if [ -z "$name" ]; then
48 echo Nothing new to pack.
49 - exit 0
50 -fi
51 -echo "Pack pack-$name created."
49 +else
50 + echo "Pack pack-$name created."
51
53 -mkdir -p "$PACKDIR" || exit
52 + mkdir -p "$PACKDIR" || exit
53
55 -mv .tmp-pack-$name.pack "$PACKDIR/pack-$name.pack" &&
56 -mv .tmp-pack-$name.idx "$PACKDIR/pack-$name.idx" ||
57 -exit
54 + mv .tmp-pack-$name.pack "$PACKDIR/pack-$name.pack" &&
55 + mv .tmp-pack-$name.idx "$PACKDIR/pack-$name.idx" ||
56 + exit
57 +fi
58
59 if test "$remove_redundant" = t
60 then