mirror of
https://github.com/git/git
synced 2024-08-25 02:35:46 +00:00
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:
parent
cf9dc65368
commit
178613c737
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue