diff options
author | Junio C Hamano <gitster@pobox.com> | 2009-02-28 00:00:21 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2009-02-28 01:06:06 -0800 |
commit | 03a9683d22eca52bc2b2b9b09258a143e76416f6 (patch) | |
tree | 9be24a9a25e8e2702f1e27a35b0504d273ecd445 /builtin-pack-objects.c | |
parent | 386cb77210cdb09cd808698d21d0e796cd77f26f (diff) | |
download | git-03a9683d22eca52bc2b2b9b09258a143e76416f6.tar.gz |
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 'builtin-pack-objects.c')
-rw-r--r-- | builtin-pack-objects.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/builtin-pack-objects.c b/builtin-pack-objects.c index 7e7719b832..150258b629 100644 --- a/builtin-pack-objects.c +++ b/builtin-pack-objects.c @@ -1915,7 +1915,7 @@ static void add_objects_in_unpacked_packs(struct rev_info *revs) const unsigned char *sha1; struct object *o; - if (is_kept_pack(p, revs)) + if (is_kept_pack(p)) continue; if (open_pack_index(p)) die("cannot open pack index"); @@ -1951,7 +1951,7 @@ static void loosen_unused_packed_objects(struct rev_info *revs) const unsigned char *sha1; for (p = packed_git; p; p = p->next) { - if (is_kept_pack(p, revs)) + if (is_kept_pack(p)) continue; if (open_pack_index(p)) @@ -2149,7 +2149,7 @@ int cmd_pack_objects(int argc, const char **argv, const char *prefix) continue; } if (!strcmp("--unpacked", arg) || - !prefixcmp(arg, "--unpacked=") || + !strcmp("--kept-pack-only", arg) || !strcmp("--reflog", arg) || !strcmp("--all", arg)) { use_internal_rev_list = 1; |