Simplify is_kept_pack()
[gitweb.git] / builtin-pack-objects.c
index 7e7719b832208b86115310da782e199daae4dc59..150258b6290e55abfefd2b56ab012a2e2c20ae30 100644 (file)
@@ -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;