aboutsummaryrefslogtreecommitdiff
path: root/git-repack.sh
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2009-02-28 00:00:21 -0800
committerJunio C Hamano <gitster@pobox.com>2009-02-28 01:06:06 -0800
commit03a9683d22eca52bc2b2b9b09258a143e76416f6 (patch)
tree9be24a9a25e8e2702f1e27a35b0504d273ecd445 /git-repack.sh
parent386cb77210cdb09cd808698d21d0e796cd77f26f (diff)
downloadgit-03a9683d22eca52bc2b2b9b09258a143e76416f6.tar.gz
git-03a9683d22eca52bc2b2b9b09258a143e76416f6.tar.xz
Simplify is_kept_pack()
This removes --unpacked=<packfile> parameter from the revision parser, and rewrites its use in git-repack to pass a single --kept-pack-only option instead. The new --kept-pack-only option means just that. When this option is given, is_kept_pack() that used to say "not on the --unpacked=<packfile> list" now says "the packfile has corresponding .keep file". Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-repack.sh')
-rwxr-xr-xgit-repack.sh5
1 files changed, 4 insertions, 1 deletions
diff --git a/git-repack.sh b/git-repack.sh
index 86000151c..a736009c6 100755
--- a/git-repack.sh
+++ b/git-repack.sh
@@ -68,10 +68,13 @@ case ",$all_into_one," in
if [ -e "$PACKDIR/$e.keep" ]; then
: keep
else
- args="$args --unpacked=$e.pack"
existing="$existing $e"
fi
done
+ if test -n "$existing"
+ then
+ args="--kept-pack-only"
+ fi
if test -n "$args" -a -n "$unpack_unreachable" -a \
-n "$remove_redundant"
then