mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* FYI, git output messages are being used by other tooling
@ 2026-10-20 18:10 Steven Rostedt
  2026-10-20 18:37 ` Junio C Hamano
  2026-10-20 18:44 ` Kristoffer Haugsbakk
  0 siblings, 2 replies; 7+ messages in thread
From: Steven Rostedt @ 2026-10-20 18:10 UTC (permalink / raw)
  To: git; +Cc: LKML, Jonas Rebmann, Junio C Hamano, Ricardo B. Marlière (SUSE)



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@marliere.net/

But I figured it would be good for you to know about this dependency.

-- Steve

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: FYI, git output messages are being used by other tooling
  2026-10-20 18:10 FYI, git output messages are being used by other tooling Steven Rostedt
@ 2026-10-20 18:37 ` Junio C Hamano
  2026-10-20 18:52   ` Steven Rostedt
                     ` (2 more replies)
  2026-10-20 18:44 ` Kristoffer Haugsbakk
  1 sibling, 3 replies; 7+ messages in thread
From: Junio C Hamano @ 2026-10-20 18:37 UTC (permalink / raw)
  To: Steven Rostedt; +Cc: git, LKML, Jonas Rebmann, Ricardo B. Marlière (SUSE)

Steven Rostedt <rostedt@goodmis.org> 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@marliere.net/
>
> 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?

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: FYI, git output messages are being used by other tooling
  2026-10-20 18:10 FYI, git output messages are being used by other tooling Steven Rostedt
  2026-10-20 18:37 ` Junio C Hamano
@ 2026-10-20 18:44 ` Kristoffer Haugsbakk
  1 sibling, 0 replies; 7+ messages in thread
From: Kristoffer Haugsbakk @ 2026-10-20 18:44 UTC (permalink / raw)
  To: Steven Rostedt, git
  Cc: LKML, Jonas Rebmann, Junio C Hamano, Ricardo B. Marlière (SUSE)

On Tue, Oct 20, 2026, at 20:10, Steven Rostedt wrote:
> 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@marliere.net/
>
> But I figured it would be good for you to know about this dependency.

There were recent threads about how to
query for the first bad commit.

https://lore.kernel.org/git/asAbOSQ4BkuCTPY5@debian/

I had a recent script that I put on hold and didn't
finish. But it involved using exit codes and querying
for things like ref state. And maybe using
git rev-list --bisect.

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: FYI, git output messages are being used by other tooling
  2026-10-20 18:37 ` Junio C Hamano
@ 2026-10-20 18:52   ` Steven Rostedt
  2026-10-20 19:09   ` Theodore Tso
  2026-10-20 19:23   ` Steven Rostedt
  2 siblings, 0 replies; 7+ messages in thread
From: Steven Rostedt @ 2026-10-20 18:52 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git, LKML, Jonas Rebmann, Ricardo B. Marlière (SUSE)

On Tue, 20 Oct 2026 11:37:01 -0700
Junio C Hamano <gitster@pobox.com> wrote:

> Steven Rostedt <rostedt@goodmis.org> 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@marliere.net/
> >
> > 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?

I could look into changing it. The code was written in 2010 so it could
perhaps be updated ;-)

Thanks,

-- Steve

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: FYI, git output messages are being used by other tooling
  2026-10-20 18:37 ` Junio C Hamano
  2026-10-20 18:52   ` Steven Rostedt
@ 2026-10-20 19:09   ` Theodore Tso
  2026-10-20 19:23   ` Steven Rostedt
  2 siblings, 0 replies; 7+ messages in thread
From: Theodore Tso @ 2026-10-20 19:09 UTC (permalink / raw)
  To: Junio C Hamano
  Cc: Steven Rostedt, git, LKML, Jonas Rebmann,
	Ricardo B. Marlière (SUSE)

On Tue, Oct 20, 2026 at 11:37:01AM -0500, Junio C Hamano wrote:
> > The change is being addressed:
> >
> >   https://lore.kernel.org/all/20261009-ktest-git-bisect-v1-1-1d1428f6cbf4@marliere.net/
> >
> > 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?
>

I wonder if we should have something like a "git bisect --format=json"
option to facilitate programs that are running git bisect in some kind
of automation.  Steven's email caused me to check my test appliance[1]
but fortunately the only thing I depend on is whether the otuput of
"git bisect good/bad" has a string which contains "is the first bad
commit" or not.  If someone has a commit with the one-line summary
which contains that string, or if git ever changed the git bisect text
output, or someone tried to set LANG to Chinese or some such, hilarity
would ensue.   :-)

[1] https://github.com/tytso/xfstests-bld/blob/master/test-appliance/files/usr/local/lib/gce-server/util/git/git.go

A structured output that contained the result of the "git bisect
good|bad", and the first bad commit if it has been found, would be
certainly be a more reliable way for automated git bisection harneses
to rely upon.  It'd be great if that was something that was in git
3.0.

						- Ted

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: FYI, git output messages are being used by other tooling
  2026-10-20 18:37 ` Junio C Hamano
  2026-10-20 18:52   ` Steven Rostedt
  2026-10-20 19:09   ` Theodore Tso
@ 2026-10-20 19:23   ` Steven Rostedt
  2026-10-20 19:28     ` Kristoffer Haugsbakk
  2 siblings, 1 reply; 7+ messages in thread
From: Steven Rostedt @ 2026-10-20 19:23 UTC (permalink / raw)
  To: Junio C Hamano; +Cc: git, LKML, Jonas Rebmann, Ricardo B. Marlière (SUSE)

On Tue, 20 Oct 2026 11:37:01 -0700
Junio C Hamano <gitster@pobox.com> wrote:

> Steven Rostedt <rostedt@goodmis.org> 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@marliere.net/
> >
> > 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 there a git command to know if the bad bisect has been found or not?

-- Steve

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: FYI, git output messages are being used by other tooling
  2026-10-20 19:23   ` Steven Rostedt
@ 2026-10-20 19:28     ` Kristoffer Haugsbakk
  0 siblings, 0 replies; 7+ messages in thread
From: Kristoffer Haugsbakk @ 2026-10-20 19:28 UTC (permalink / raw)
  To: Steven Rostedt, Junio C Hamano
  Cc: git, LKML, Jonas Rebmann, Ricardo B. Marlière (SUSE)

On Tue, Oct 20, 2026, at 21:23, Steven Rostedt wrote:
> On Tue, 20 Oct 2026 11:37:01 -0700
> Junio C Hamano <gitster@pobox.com> wrote:
>
>> Steven Rostedt <rostedt@goodmis.org> 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@marliere.net/
>> >
>> > 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

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2026-10-20 19:28 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-20 18:10 FYI, git output messages are being used by other tooling Steven Rostedt
2026-10-20 18:37 ` Junio C Hamano
2026-10-20 18:52   ` Steven Rostedt
2026-10-20 19:09   ` Theodore Tso
2026-10-20 19:23   ` Steven Rostedt
2026-10-20 19:28     ` Kristoffer Haugsbakk
2026-10-20 18:44 ` Kristoffer Haugsbakk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®