diff options
author | Christian Couder <chriscool@tuxfamily.org> | 2009-03-29 11:55:43 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2009-04-05 01:29:45 -0700 |
commit | 37c4c38d7356bf256d0297fdbac78ef8b6807fac (patch) | |
tree | 71a160a91feae0616ede3faa9e7208bfd2da6c3e /builtin-rev-list.c | |
parent | b74d7efb108c9d3fd2d057b0c452583552a0577a (diff) | |
download | git-37c4c38d7356bf256d0297fdbac78ef8b6807fac.tar.gz |
rev-list: pass "int flags" as last argument of "show_bisect_vars"
Instead of "int show_all, int show_tried" we now only pass "int flags",
because we will add one more flag in a later patch.
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin-rev-list.c')
-rw-r--r-- | builtin-rev-list.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/builtin-rev-list.c b/builtin-rev-list.c index 925d64356c..69dca631d9 100644 --- a/builtin-rev-list.c +++ b/builtin-rev-list.c @@ -236,17 +236,16 @@ static void show_tried_revs(struct commit_list *tried) printf("'\n"); } -int show_bisect_vars(struct rev_info *revs, int reaches, int all, - int show_all, int show_tried) +int show_bisect_vars(struct rev_info *revs, int reaches, int all, int flags) { int cnt; char hex[41] = ""; struct commit_list *tried; - if (!revs->commits && !show_tried) + if (!revs->commits && !(flags & BISECT_SHOW_TRIED)) return 1; - revs->commits = filter_skipped(revs->commits, &tried, show_all); + revs->commits = filter_skipped(revs->commits, &tried, flags & BISECT_SHOW_ALL); /* * revs->commits can reach "reaches" commits among @@ -264,12 +263,12 @@ int show_bisect_vars(struct rev_info *revs, int reaches, int all, if (revs->commits) strcpy(hex, sha1_to_hex(revs->commits->item->object.sha1)); - if (show_all) { + if (flags & BISECT_SHOW_ALL) { traverse_commit_list(revs, show_commit, show_object); printf("------\n"); } - if (show_tried) + if (flags & BISECT_SHOW_TRIED) show_tried_revs(tried); printf("bisect_rev=%s\n" "bisect_nr=%d\n" @@ -379,7 +378,7 @@ int cmd_rev_list(int argc, const char **argv, const char *prefix) if (bisect_show_vars) return show_bisect_vars(&revs, reaches, all, - bisect_show_all, 0); + bisect_show_all ? BISECT_SHOW_ALL : 0); } traverse_commit_list(&revs, |