Re: FYI, git output messages are being used by other tooling
From: Kristoffer Haugsbakk
Date: Tue Oct 20 2026 - 15:30:14 EST
On Tue, Oct 20, 2026, at 21:23, Steven Rostedt wrote:
> On Tue, 20 Oct 2026 11:37:01 -0700
> Junio C Hamano <gitster@xxxxxxxxx> wrote:
>
>> Steven Rostedt <rostedt@xxxxxxxxxxx> writes:
>>
>> > Hi,
>> >
>> > I just want to let you folks know that ktest.pl (tools/testing/ktest/ in
>> > the Linux kernel repository) parses the output of git to display the first
>> > bad commit found in an automated git bisect.
>> >
>> > The output was recently updated via: 0c0f93e7fa64 ("bisect: print bisect
>> > terms in single quotes") which made ktest.pl fail to find the bad commit.
>> >
>> > The change is being addressed:
>> >
>> > https://lore.kernel.org/all/20261009-ktest-git-bisect-v1-1-1d1428f6cbf4@xxxxxxxxxxxx/
>> >
>> > But I figured it would be good for you to know about this dependency.
>>
>> Shouldn't the script instead seeing "git show bisect/bad" instead?
>
> Hmm, it also is used to see if the bisect finished or not. It looks at the
> output of the last git bisect action and has:
>
> if ($output =~ m/^(Bisecting: .*\(roughly \d+
> steps?\))\s+\[([[:xdigit:]]+)\]/) {
> doprint "$1 [$2]\n";
> } elsif ($output =~ m/^([[:xdigit:]]+) is the first bad commit/) {
> $bisect_bad_commit = $1;
> doprint "Found bad commit... $1\n";
> return 0;
> } else {
> # we already logged it, just print it now.
> print $output;
> }
> return 1;
>
> Where returning 0 means the bad commit has been found.
> Otherwise it keeps looping.
Is this different from git bisect run?
>
> Is there a git command to know if the bad bisect has been found or not?
>
> -- Steve
Sent from mobile