has_sha1_kept_pack(): take "struct rev_info"

Its "ignore_packed" parameter always comes from struct rev_info.  This
patch makes the function take a pointer to the surrounding structure, so
that the refactoring in the next patch becomes easier to review.

There is an unfortunate header file dependency and the easiest workaround
is to temporarily move the function declaration from cache.h to
revision.h; this will be moved back to cache.h once the function loses
this "ignore_packed" parameter altogether in the later part of the
series.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Junio C Hamano
2009-02-27 23:30:38 -08:00
parent cd673c1f17
commit b8431b033f
4 changed files with 12 additions and 9 deletions

View File

@ -1486,7 +1486,7 @@ 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->ignore_packed))
has_sha1_kept_pack(commit->object.sha1, revs))
return commit_ignore;
if (revs->show_all)
return commit_show;