summaryrefslogtreecommitdiff
path: root/revision.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2009-02-28 07:15:53 (GMT)
committerJunio C Hamano <gitster@pobox.com>2009-02-28 09:06:06 (GMT)
commitcd673c1f17228d272c4b7f81fbb28bc31cf0cac6 (patch)
tree5e5537843e6b38f62a3b4f15437e4a3bf8ee89ab /revision.c
parent2478dc84b5fb2617bfab3a8f65f1270de578b94a (diff)
downloadgit-cd673c1f17228d272c4b7f81fbb28bc31cf0cac6.zip
git-cd673c1f17228d272c4b7f81fbb28bc31cf0cac6.tar.gz
git-cd673c1f17228d272c4b7f81fbb28bc31cf0cac6.tar.bz2
has_sha1_pack(): refactor "pretend these packs do not exist" interface
Most of the callers of this function except only one pass NULL to its last parameter, ignore_packed. Introduce has_sha1_kept_pack() function that has the function signature and the semantics of this function, and convert the sole caller that does not pass NULL to call this new function. All other callers and has_sha1_pack() lose the ignore_packed parameter. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'revision.c')
-rw-r--r--revision.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/revision.c b/revision.c
index 45fd7a3..746eeed 100644
--- a/revision.c
+++ b/revision.c
@@ -1485,7 +1485,8 @@ 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_pack(commit->object.sha1, revs->ignore_packed))
+ if (revs->unpacked &&
+ has_sha1_kept_pack(commit->object.sha1, revs->ignore_packed))
return commit_ignore;
if (revs->show_all)
return commit_show;