From: Christian Couder <chriscool@tuxfamily.org>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org, Linus Torvalds <torvalds@linux-foundation.org>
Subject: [RFC/PATCH 2/3] revision: change '--bisect' rev machinery argument to 'bisect-refs'
Date: Wed, 04 Nov 2009 05:00:02 +0100 [thread overview]
Message-ID: <20091104040004.4545.49960.chriscool@tuxfamily.org> (raw)
In-Reply-To: <20091104034312.4545.2176.chriscool@tuxfamily.org>
Using '--bisect' as a revision machinery argument is bogus because
it conflicts with the special '--bisect' argument for "rev-list".
And as shown by a test case added by a previous commit, this cannot
be fixed by adding a special flag to "struct rev_info".
So this commit just renames the '--bisect' flag to the revision
machinery into '--bisect-refs', and reverts the changes that added
the special flag to "struct rev_info".
This makes the test case added previously pass.
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
---
builtin-rev-list.c | 2 --
builtin-rev-parse.c | 4 ++--
revision.c | 5 ++---
revision.h | 1 -
t/t6030-bisect-porcelain.sh | 2 +-
5 files changed, 5 insertions(+), 9 deletions(-)
diff --git a/builtin-rev-list.c b/builtin-rev-list.c
index 9e736b4..2ccbfbb 100644
--- a/builtin-rev-list.c
+++ b/builtin-rev-list.c
@@ -320,8 +320,6 @@ int cmd_rev_list(int argc, const char **argv, const char *prefix)
memset(&info, 0, sizeof(info));
info.revs = &revs;
- if (revs.bisect)
- bisect_list = 1;
quiet = DIFF_OPT_TST(&revs.diffopt, QUICK);
for (i = 1 ; i < argc; i++) {
diff --git a/builtin-rev-parse.c b/builtin-rev-parse.c
index 9526aaf..201a458 100644
--- a/builtin-rev-parse.c
+++ b/builtin-rev-parse.c
@@ -39,7 +39,7 @@ static int is_rev_argument(const char *arg)
{
static const char *rev_args[] = {
"--all",
- "--bisect",
+ "--bisect-refs",
"--dense",
"--branches",
"--header",
@@ -554,7 +554,7 @@ int cmd_rev_parse(int argc, const char **argv, const char *prefix)
for_each_ref(show_reference, NULL);
continue;
}
- if (!strcmp(arg, "--bisect")) {
+ if (!strcmp(arg, "--bisect-refs")) {
for_each_ref_in("refs/bisect/bad", show_reference, NULL);
for_each_ref_in("refs/bisect/good", anti_reference, NULL);
continue;
diff --git a/revision.c b/revision.c
index 5cedd15..d1a1edc 100644
--- a/revision.c
+++ b/revision.c
@@ -995,7 +995,7 @@ static int handle_revision_opt(struct rev_info *revs, int argc, const char **arg
!strcmp(arg, "--tags") || !strcmp(arg, "--remotes") ||
!strcmp(arg, "--reflog") || !strcmp(arg, "--not") ||
!strcmp(arg, "--no-walk") || !strcmp(arg, "--do-walk") ||
- !strcmp(arg, "--bisect"))
+ !strcmp(arg, "--bisect-refs"))
{
unkv[(*unkc)++] = arg;
return 1;
@@ -1270,10 +1270,9 @@ int setup_revisions(int argc, const char **argv, struct rev_info *revs, const ch
handle_refs(revs, flags, for_each_branch_ref);
continue;
}
- if (!strcmp(arg, "--bisect")) {
+ if (!strcmp(arg, "--bisect-refs")) {
handle_refs(revs, flags, for_each_bad_bisect_ref);
handle_refs(revs, flags ^ UNINTERESTING, for_each_good_bisect_ref);
- revs->bisect = 1;
continue;
}
if (!strcmp(arg, "--tags")) {
diff --git a/revision.h b/revision.h
index 921656a..b6421a6 100644
--- a/revision.h
+++ b/revision.h
@@ -63,7 +63,6 @@ struct rev_info {
reverse:1,
reverse_output_stage:1,
cherry_pick:1,
- bisect:1,
first_parent_only:1;
/* Diff flags */
diff --git a/t/t6030-bisect-porcelain.sh b/t/t6030-bisect-porcelain.sh
index 88a2877..4e4160e 100755
--- a/t/t6030-bisect-porcelain.sh
+++ b/t/t6030-bisect-porcelain.sh
@@ -392,7 +392,7 @@ test_expect_success 'bisect does not create a "bisect" branch' '
git branch -D bisect
'
-test_expect_failure 'bisect and "rev-list --bisect"' '
+test_expect_success 'bisect and "rev-list --bisect"' '
rev_list2=$(git rev-list --bisect $HASH3 --not $HASH1) &&
test "$rev_list2" = "$HASH2" &&
rev_list4=$(git rev-list --bisect $HASH7 --not $HASH1) &&
--
1.6.5.1.gaf97d
next prev parent reply other threads:[~2009-11-04 3:59 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-04 4:00 [RFC/PATCH 0/3] use '--bisect-refs' as bisect rev machinery option Christian Couder
2009-11-04 4:00 ` [RFC/PATCH 1/3] t6030: show "rev-list --bisect" breakage when bisecting Christian Couder
2009-11-04 4:00 ` Christian Couder [this message]
2009-11-04 4:00 ` [RFC/PATCH 3/3] bisect: simplify calling visualizer using '--bisect-refs' Christian Couder
2009-11-04 18:25 ` [RFC/PATCH 0/3] use '--bisect-refs' as bisect rev machinery option Junio C Hamano
2009-11-04 18:32 ` Linus Torvalds
2009-11-04 18:35 ` Linus Torvalds
2009-11-04 19:22 ` Junio C Hamano
2009-11-04 21:26 ` Christian Couder
2009-11-04 21:52 ` Junio C Hamano
2009-11-05 5:22 ` Christian Couder
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20091104040004.4545.49960.chriscool@tuxfamily.org \
--to=chriscool@tuxfamily.org \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=torvalds@linux-foundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).