diff options
author | Junio C Hamano <gitster@pobox.com> | 2009-02-28 00:37:19 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2009-02-28 01:06:06 -0800 |
commit | 69e020ae00ebd3f7ae3c2f35acb139361417ef64 (patch) | |
tree | e5d700170a0604ee30f3317fc93f816c6d2a1a30 /revision.c | |
parent | 03a9683d22eca52bc2b2b9b09258a143e76416f6 (diff) | |
download | git-69e020ae00ebd3f7ae3c2f35acb139361417ef64.tar.gz git-69e020ae00ebd3f7ae3c2f35acb139361417ef64.tar.xz |
is_kept_pack(): final clean-up
Now is_kept_pack() is just a member lookup into a structure, we can write
it as such.
Also rewrite the sole caller of has_sha1_kept_pack() to switch on the
criteria the callee uses (namely, revs->kept_pack_only) between calling
has_sha1_kept_pack() and has_sha1_pack(), so that these two callees do not
have to take a pointer to struct rev_info as an argument.
This removes the header file dependency issue temporarily introduced by
the earlier commit, so we revert changes associated to that as well.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'revision.c')
-rw-r--r-- | revision.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/revision.c b/revision.c index 3cfd6539a..6d8ac4608 100644 --- a/revision.c +++ b/revision.c @@ -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; |