summaryrefslogtreecommitdiff
path: root/git-repack.sh
diff options
context:
space:
mode:
authorMartin Waitz <tali@admingilde.org>2006-05-07 18:18:53 (GMT)
committerJunio C Hamano <junkio@cox.net>2006-05-07 22:35:50 (GMT)
commit178613c737f82489a1e2c387236731541fe19081 (patch)
tree5664a7d05a43beb7f8ad1c1da1fe25f6414e105a /git-repack.sh
parentcf9dc65368113caa28f2829e2ada5477fbb031ec (diff)
downloadgit-178613c737f82489a1e2c387236731541fe19081.zip
git-178613c737f82489a1e2c387236731541fe19081.tar.gz
git-178613c737f82489a1e2c387236731541fe19081.tar.bz2
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>
Diffstat (limited to 'git-repack.sh')
-rwxr-xr-xgit-repack.sh14
1 files changed, 7 insertions, 7 deletions
diff --git a/git-repack.sh b/git-repack.sh
index a5d349f..20774fb 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