Skip to content

Commit

Permalink
repack: honor -d even when no new pack was created
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Martin Waitz authored and Junio C Hamano committed May 7, 2006
1 parent cf9dc65 commit 178613c
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions git-repack.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 178613c

Please sign in to comment.