diff options
Diffstat (limited to 'builtin-pack-objects.c')
-rw-r--r-- | builtin-pack-objects.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/builtin-pack-objects.c b/builtin-pack-objects.c index fb5e14d56e..7e7719b832 100644 --- a/builtin-pack-objects.c +++ b/builtin-pack-objects.c @@ -1915,11 +1915,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 (is_kept_pack(p, revs)) continue; if (open_pack_index(p)) die("cannot open pack index"); @@ -1955,11 +1951,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 (is_kept_pack(p, revs)) continue; if (open_pack_index(p)) |