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>
This commit is contained in:
Martin Waitz 2006-05-07 20:18:53 +02:00 committed by Junio C Hamano
parent cf9dc65368
commit 178613c737

View file

@ -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
else
echo "Pack pack-$name created."
mkdir -p "$PACKDIR" || exit
mv .tmp-pack-$name.pack "$PACKDIR/pack-$name.pack" &&
mv .tmp-pack-$name.idx "$PACKDIR/pack-$name.idx" ||
exit
fi
echo "Pack pack-$name created."
mkdir -p "$PACKDIR" || exit
mv .tmp-pack-$name.pack "$PACKDIR/pack-$name.pack" &&
mv .tmp-pack-$name.idx "$PACKDIR/pack-$name.idx" ||
exit
if test "$remove_redundant" = t
then