diff options
author | Junio C Hamano <gitster@pobox.com> | 2009-03-11 13:49:56 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2009-03-11 13:49:56 -0700 |
commit | aec813062b340e6bb181470cf57cc4b4406e1bb8 (patch) | |
tree | bb2b33ca6b89fdfd8d0e4b2e6d34f5a806674b67 /builtin-pack-objects.c | |
parent | 8f4cc7911955a3642af601394a4b4473e7bfde33 (diff) | |
parent | 69e020ae00ebd3f7ae3c2f35acb139361417ef64 (diff) | |
download | git-aec813062b340e6bb181470cf57cc4b4406e1bb8.tar.gz |
Merge branch 'jc/maint-1.6.0-keep-pack'
* jc/maint-1.6.0-keep-pack:
is_kept_pack(): final clean-up
Simplify is_kept_pack()
Consolidate ignore_packed logic more
has_sha1_kept_pack(): take "struct rev_info"
has_sha1_pack(): refactor "pretend these packs do not exist" interface
git-repack: resist stray environment variable
Diffstat (limited to 'builtin-pack-objects.c')
-rw-r--r-- | builtin-pack-objects.c | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/builtin-pack-objects.c b/builtin-pack-objects.c index bcefa52c69..1c6d2c498b 100644 --- a/builtin-pack-objects.c +++ b/builtin-pack-objects.c @@ -1966,11 +1966,7 @@ static void add_objects_in_unpacked_packs(struct rev_info *revs) const unsigned char *sha1; struct object *o; - for (i = 0; i < revs->num_ignore_packed; i++) { - if (matches_pack_name(p, revs->ignore_packed[i])) - break; - } - if (revs->num_ignore_packed <= i) + if (p->pack_keep) continue; if (open_pack_index(p)) die("cannot open pack index"); @@ -2006,11 +2002,7 @@ static void loosen_unused_packed_objects(struct rev_info *revs) const unsigned char *sha1; for (p = packed_git; p; p = p->next) { - for (i = 0; i < revs->num_ignore_packed; i++) { - if (matches_pack_name(p, revs->ignore_packed[i])) - break; - } - if (revs->num_ignore_packed <= i) + if (p->pack_keep) continue; if (open_pack_index(p)) @@ -2208,7 +2200,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; |