pack-objects: only repack or loosen objects residing in "local" packs
[gitweb.git] / revision.c
index 3cfd6539aba3baa35375690d3cb723c1ba7a0fcf..6d8ac460817d3eef5019f9f27fc8b9ebc04322a2 100644 (file)
@@ -1476,7 +1476,9 @@ enum commit_action simplify_commit(struct rev_info *revs, struct commit *commit)
        if (commit->object.flags & SHOWN)
                return commit_ignore;
        if (revs->unpacked &&
-           has_sha1_kept_pack(commit->object.sha1, revs))
+           (revs->kept_pack_only
+            ? has_sha1_kept_pack(commit->object.sha1)
+            : has_sha1_pack(commit->object.sha1)))
                return commit_ignore;
        if (revs->show_all)
                return commit_show;