aboutsummaryrefslogtreecommitdiff
path: root/git-repack.sh
diff options
context:
space:
mode:
Diffstat (limited to 'git-repack.sh')
-rwxr-xr-xgit-repack.sh10
1 files changed, 9 insertions, 1 deletions
diff --git a/git-repack.sh b/git-repack.sh
index 064c85cbb..b395d0ef3 100755
--- a/git-repack.sh
+++ b/git-repack.sh
@@ -58,7 +58,15 @@ then
# all-into-one is used.
if test "$all_into_one" != '' && test "$existing" != ''
then
- ( cd "$PACKDIR" && rm -f $existing )
+ ( cd "$PACKDIR" &&
+ for e in $existing
+ do
+ case "$e" in
+ ./pack-$name.pack | ./pack-$name.idx) ;;
+ *) rm -f $e ;;
+ esac
+ done
+ )
fi
fi