summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: b74d7ef)
raw | patch | inline | side by side (parent: b74d7ef)
author | Christian Couder <chriscool@tuxfamily.org> | |
Sun, 29 Mar 2009 09:55:43 +0000 (11:55 +0200) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Sun, 5 Apr 2009 08:29:45 +0000 (01:29 -0700) |
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>
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>
bisect.c | patch | blob | history | |
bisect.h | patch | blob | history | |
builtin-rev-list.c | patch | blob | history |
diff --git a/bisect.c b/bisect.c
index 3279fb12b2abcdd90fd58d30d1694f9d7a0d36a6..285bf146c13c8be387c7254ec756c0a78c89239e 100644 (file)
--- a/bisect.c
+++ b/bisect.c
revs.commits = find_bisection(revs.commits, &reaches, &all,
!!skipped_sha1_nr);
- return show_bisect_vars(&revs, reaches, all, 0, 1);
+ return show_bisect_vars(&revs, reaches, all, BISECT_SHOW_TRIED);
}
diff --git a/bisect.h b/bisect.h
index 05eea175f792ad3944b6e6584c4380318e4b2489..b9aa88482eea7b797d978b58b99aba9a4f059ccc 100644 (file)
--- a/bisect.h
+++ b/bisect.h
struct commit_list **tried,
int show_all);
+/* show_bisect_vars flags */
+#define BISECT_SHOW_ALL (1<<0)
+#define BISECT_SHOW_TRIED (1<<1)
+
/*
- * The "show_all" parameter should be 0 if this function is called
+ * The flag BISECT_SHOW_ALL should not be set if this function is called
* from outside "builtin-rev-list.c" as otherwise it would use
* static "revs" from this file.
*/
extern int show_bisect_vars(struct rev_info *revs, int reaches, int all,
- int show_all, int show_tried);
+ int flags);
extern int bisect_next_vars(const char *prefix);
diff --git a/builtin-rev-list.c b/builtin-rev-list.c
index 925d64356c1ece431bdc131531e7a8239635dd17..69dca631d9fe2480af544acfb3a2b1880dedb934 100644 (file)
--- a/builtin-rev-list.c
+++ b/builtin-rev-list.c
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
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"
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,