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;