summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 4d16f8d)
raw | patch | inline | side by side (parent: 4d16f8d)
author | Lukas Sandström <lukass@etek.chalmers.se> | |
Fri, 18 Nov 2005 20:36:12 +0000 (21:36 +0100) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Fri, 18 Nov 2005 22:26:31 +0000 (14:26 -0800) |
No point in running git-pack-redundant if we already know
which packs are redundant.
Signed-off-by: Lukas Sandström <lukass@etek.chalmers.se>
Signed-off-by: Junio C Hamano <junkio@cox.net>
which packs are redundant.
Signed-off-by: Lukas Sandström <lukass@etek.chalmers.se>
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 e58fdd6d87d7fb626ec0d36be0b2de9f86f01862..55a7b27dcdc646ea03da49673738e1e024a127c1 100755 (executable)
--- a/git-repack.sh
+++ b/git-repack.sh
if test "$remove_redundant" = t
then
sync
- redundant=$(git-pack-redundant --all)
- if test "$redundant" != "" ; then
- echo $redundant | xargs rm
+ if test "$all_into_one" = t
+ then
+ cd "$PACKDIR"
+ existing=`find . -type f \( -name '*.pack' -o -name '*.idx' \) -print`
+ for e in $existing
+ do
+ case "$e" in
+ ./pack-$name.pack | ./pack-$name.idx) ;;
+ *) rm -f $e ;;
+ esac
+ done
+ else
+ redundant=$(git-pack-redundant --all)
+ if test "$redundant" != "" ; then
+ echo $redundant | xargs rm
+ fi
fi
fi