Add '--bisect' revision machinery argument
I personally use "git bisect visualize" all the time when I bisect, but it turns out that that is not a very flexible model. Sometimes I want to do bisection based on all commits (no pathname limiting), but then visualize the current bisection tree with just a few pathnames because I _suspect_ those pathnames are involved in the problem but am not totally sure about them. And at other times, I want to use other revision parsing logic, none of which is available with "git bisect visualize". So this adds "--bisect" as a revision parsing argument, and as a result it just works with all the normal logging tools. So now I can just do gitk --bisect --simplify-by-decoration filename-here etc. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
78d553b7d7
commit
ad3f9a71a8
@ -180,6 +180,12 @@ static int show_reference(const char *refname, const unsigned char *sha1, int fl
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int anti_reference(const char *refname, const unsigned char *sha1, int flag, void *cb_data)
|
||||
{
|
||||
show_rev(REVERSED, sha1, refname);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void show_datestring(const char *flag, const char *datestr)
|
||||
{
|
||||
static char buffer[100];
|
||||
@ -548,6 +554,11 @@ int cmd_rev_parse(int argc, const char **argv, const char *prefix)
|
||||
for_each_ref(show_reference, NULL);
|
||||
continue;
|
||||
}
|
||||
if (!strcmp(arg, "--bisect")) {
|
||||
for_each_ref_in("refs/bisect/bad", show_reference, NULL);
|
||||
for_each_ref_in("refs/bisect/good", anti_reference, NULL);
|
||||
continue;
|
||||
}
|
||||
if (!strcmp(arg, "--branches")) {
|
||||
for_each_branch_ref(show_reference, NULL);
|
||||
continue;
|
||||
|
Reference in New Issue
Block a user