summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 434d036)
raw | patch | inline | side by side (parent: 434d036)
author | Junio C Hamano <junkio@cox.net> | |
Sun, 18 Sep 2005 06:35:49 +0000 (23:35 -0700) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Sun, 18 Sep 2005 06:35:49 +0000 (23:35 -0700) |
Using "git repack -a -d" can destroy your git archive if you use it
twice in succession, because the new pack can be called the same as
the old pack. Found by Linus.
Signed-off-by: Junio C Hamano <junkio@cox.net>
twice in succession, because the new pack can be called the same as
the old pack. Found by Linus.
Signed-off-by: Junio C Hamano <junkio@cox.net>
git-repack.sh | patch | blob | history |
diff --git a/git-repack.sh b/git-repack.sh
index 064c85cbb624ebaa7a9a5776328afe7063126395..b395d0ef34758f2e3e3129a5131832e932ab7875 100755 (executable)
--- a/git-repack.sh
+++ b/git-repack.sh
# 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