{"thread":{"id":"66605","subject":"FYI, git output messages are being used by other tooling","startedAt":"2026-10-20T18:10:11Z","lastAt":"2026-10-21T18:26:53Z","messageCount":12,"participants":["Steven Rostedt","Junio C Hamano","Kristoffer Haugsbakk","Theodore Tso","Andreas Schwab"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"555587","messageId":"20261020141011.0015d172@gandalf.local.home","threadId":"66605","inReplyTo":null,"subject":"FYI, git output messages are being used by other tooling","fromName":"Steven Rostedt","fromEmail":"rostedt@goodmis.org","sentAt":"2026-10-20T18:10:11Z","receivedAt":"2026-10-20T18:10:11Z","isPatch":false,"sender":{"key":"rostedt@goodmis.org","avatar":"https://gravatar.com/avatar/cc188bf330d625ec6a7a2d0b6f4829dc777963e8dab83d943691dc31c5095227?d=mp&s=160"},"body":"\n\nHi,\n\nI just want to let you folks know that ktest.pl (tools/testing/ktest/ in\nthe Linux kernel repository) parses the output of git to display the first\nbad commit found in an automated git bisect.\n\nThe output was recently updated via: 0c0f93e7fa64 (\"bisect: print bisect\nterms in single quotes\") which made ktest.pl fail to find the bad commit.\n\nThe change is being addressed:\n\n  https://lore.kernel.org/all/20261009-ktest-git-bisect-v1-1-1d1428f6cbf4@marliere.net/\n\nBut I figured it would be good for you to know about this dependency.\n\n-- Steve\n\n"},{"id":"555598","messageId":"xmqq8q3sw75e.fsf@gitster.g","threadId":"66605","inReplyTo":"20261020141011.0015d172@gandalf.local.home","subject":"Re: FYI, git output messages are being used by other tooling","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2026-10-20T18:37:01Z","receivedAt":"2026-10-20T18:37:01Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Steven Rostedt <rostedt@goodmis.org> writes:\n\n> Hi,\n>\n> I just want to let you folks know that ktest.pl (tools/testing/ktest/ in\n> the Linux kernel repository) parses the output of git to display the first\n> bad commit found in an automated git bisect.\n>\n> The output was recently updated via: 0c0f93e7fa64 (\"bisect: print bisect\n> terms in single quotes\") which made ktest.pl fail to find the bad commit.\n>\n> The change is being addressed:\n>\n>   https://lore.kernel.org/all/20261009-ktest-git-bisect-v1-1-1d1428f6cbf4@marliere.net/\n>\n> But I figured it would be good for you to know about this dependency.\n\nShouldn't the script instead seeing \"git show bisect/bad\" instead?\n\n"},{"id":"555601","messageId":"095638e2-3e01-4217-8f08-3f9cb7fe8a07@app.fastmail.com","threadId":"66605","inReplyTo":"20261020141011.0015d172@gandalf.local.home","subject":"Re: FYI, git output messages are being used by other tooling","fromName":"Kristoffer Haugsbakk","fromEmail":"kristofferhaugsbakk@fastmail.com","sentAt":"2026-10-20T18:44:41Z","receivedAt":"2026-10-20T18:44:41Z","isPatch":false,"sender":{"key":"kristofferhaugsbakk@fastmail.com","avatar":null},"body":"On Tue, Oct 20, 2026, at 20:10, Steven Rostedt wrote:\n> Hi,\n>\n> I just want to let you folks know that ktest.pl (tools/testing/ktest/ in\n> the Linux kernel repository) parses the output of git to display the first\n> bad commit found in an automated git bisect.\n>\n> The output was recently updated via: 0c0f93e7fa64 (\"bisect: print bisect\n> terms in single quotes\") which made ktest.pl fail to find the bad commit.\n>\n> The change is being addressed:\n>\n>   \n> https://lore.kernel.org/all/20261009-ktest-git-bisect-v1-1-1d1428f6cbf4@marliere.net/\n>\n> But I figured it would be good for you to know about this dependency.\n\nThere were recent threads about how to\nquery for the first bad commit.\n\nhttps://lore.kernel.org/git/asAbOSQ4BkuCTPY5@debian/\n\nI had a recent script that I put on hold and didn't\nfinish. But it involved using exit codes and querying\nfor things like ref state. And maybe using\ngit rev-list --bisect.\n\n"},{"id":"555606","messageId":"20261020145256.411985b3@gandalf.local.home","threadId":"66605","inReplyTo":"xmqq8q3sw75e.fsf@gitster.g","subject":"Re: FYI, git output messages are being used by other tooling","fromName":"Steven Rostedt","fromEmail":"rostedt@goodmis.org","sentAt":"2026-10-20T18:52:56Z","receivedAt":"2026-10-20T18:52:56Z","isPatch":false,"sender":{"key":"rostedt@goodmis.org","avatar":"https://gravatar.com/avatar/cc188bf330d625ec6a7a2d0b6f4829dc777963e8dab83d943691dc31c5095227?d=mp&s=160"},"body":"On Tue, 20 Oct 2026 11:37:01 -0700\nJunio C Hamano <gitster@pobox.com> wrote:\n\n> Steven Rostedt <rostedt@goodmis.org> writes:\n> \n> > Hi,\n> >\n> > I just want to let you folks know that ktest.pl (tools/testing/ktest/ in\n> > the Linux kernel repository) parses the output of git to display the first\n> > bad commit found in an automated git bisect.\n> >\n> > The output was recently updated via: 0c0f93e7fa64 (\"bisect: print bisect\n> > terms in single quotes\") which made ktest.pl fail to find the bad commit.\n> >\n> > The change is being addressed:\n> >\n> >   https://lore.kernel.org/all/20261009-ktest-git-bisect-v1-1-1d1428f6cbf4@marliere.net/\n> >\n> > But I figured it would be good for you to know about this dependency.  \n> \n> Shouldn't the script instead seeing \"git show bisect/bad\" instead?\n\nI could look into changing it. The code was written in 2010 so it could\nperhaps be updated ;-)\n\nThanks,\n\n-- Steve\n\n"},{"id":"555611","messageId":"ate61iEAj4HDIvzY@mit.edu","threadId":"66605","inReplyTo":"xmqq8q3sw75e.fsf@gitster.g","subject":"Re: FYI, git output messages are being used by other tooling","fromName":"Theodore Tso","fromEmail":"tytso@mit.edu","sentAt":"2026-10-20T19:09:20Z","receivedAt":"2026-10-20T19:09:20Z","isPatch":false,"sender":{"key":"tytso@mit.edu","avatar":"https://avatars.githubusercontent.com/u/51416?v=4"},"body":"On Tue, Oct 20, 2026 at 11:37:01AM -0500, Junio C Hamano wrote:\n> > The change is being addressed:\n> >\n> >   https://lore.kernel.org/all/20261009-ktest-git-bisect-v1-1-1d1428f6cbf4@marliere.net/\n> >\n> > But I figured it would be good for you to know about this dependency.\n> \n> Shouldn't the script instead seeing \"git show bisect/bad\" instead?\n>\n\nI wonder if we should have something like a \"git bisect --format=json\"\noption to facilitate programs that are running git bisect in some kind\nof automation.  Steven's email caused me to check my test appliance[1]\nbut fortunately the only thing I depend on is whether the otuput of\n\"git bisect good/bad\" has a string which contains \"is the first bad\ncommit\" or not.  If someone has a commit with the one-line summary\nwhich contains that string, or if git ever changed the git bisect text\noutput, or someone tried to set LANG to Chinese or some such, hilarity\nwould ensue.   :-)\n\n[1] https://github.com/tytso/xfstests-bld/blob/master/test-appliance/files/usr/local/lib/gce-server/util/git/git.go\n\nA structured output that contained the result of the \"git bisect\ngood|bad\", and the first bad commit if it has been found, would be\ncertainly be a more reliable way for automated git bisection harneses\nto rely upon.  It'd be great if that was something that was in git\n3.0.\n\n\t\t\t\t\t\t- Ted\n\n"},{"id":"555615","messageId":"20261020152354.165ad128@gandalf.local.home","threadId":"66605","inReplyTo":"xmqq8q3sw75e.fsf@gitster.g","subject":"Re: FYI, git output messages are being used by other tooling","fromName":"Steven Rostedt","fromEmail":"rostedt@goodmis.org","sentAt":"2026-10-20T19:23:54Z","receivedAt":"2026-10-20T19:23:54Z","isPatch":false,"sender":{"key":"rostedt@goodmis.org","avatar":"https://gravatar.com/avatar/cc188bf330d625ec6a7a2d0b6f4829dc777963e8dab83d943691dc31c5095227?d=mp&s=160"},"body":"On Tue, 20 Oct 2026 11:37:01 -0700\nJunio C Hamano <gitster@pobox.com> wrote:\n\n> Steven Rostedt <rostedt@goodmis.org> writes:\n> \n> > Hi,\n> >\n> > I just want to let you folks know that ktest.pl (tools/testing/ktest/ in\n> > the Linux kernel repository) parses the output of git to display the first\n> > bad commit found in an automated git bisect.\n> >\n> > The output was recently updated via: 0c0f93e7fa64 (\"bisect: print bisect\n> > terms in single quotes\") which made ktest.pl fail to find the bad commit.\n> >\n> > The change is being addressed:\n> >\n> >   https://lore.kernel.org/all/20261009-ktest-git-bisect-v1-1-1d1428f6cbf4@marliere.net/\n> >\n> > But I figured it would be good for you to know about this dependency.  \n> \n> Shouldn't the script instead seeing \"git show bisect/bad\" instead?\n\nHmm, it also is used to see if the bisect finished or not. It looks at the\noutput of the last git bisect action and has:\n\n    if ($output =~ m/^(Bisecting: .*\\(roughly \\d+ steps?\\))\\s+\\[([[:xdigit:]]+)\\]/) {\n\tdoprint \"$1 [$2]\\n\";\n    } elsif ($output =~ m/^([[:xdigit:]]+) is the first bad commit/) {\n\t$bisect_bad_commit = $1;\n\tdoprint \"Found bad commit... $1\\n\";\n\treturn 0;\n    } else {\n\t# we already logged it, just print it now.\n\tprint $output;\n    }\n    return 1;\n\nWhere returning 0 means the bad commit has been found.\nOtherwise it keeps looping.\n\nIs there a git command to know if the bad bisect has been found or not?\n\n-- Steve\n\n"},{"id":"555616","messageId":"83c59078-f6f1-456a-a99b-688eaf56bab0@app.fastmail.com","threadId":"66605","inReplyTo":"20261020152354.165ad128@gandalf.local.home","subject":"Re: FYI, git output messages are being used by other tooling","fromName":"Kristoffer Haugsbakk","fromEmail":"kristofferhaugsbakk@fastmail.com","sentAt":"2026-10-20T19:28:10Z","receivedAt":"2026-10-20T19:28:10Z","isPatch":false,"sender":{"key":"kristofferhaugsbakk@fastmail.com","avatar":null},"body":"On Tue, Oct 20, 2026, at 21:23, Steven Rostedt wrote:\n> On Tue, 20 Oct 2026 11:37:01 -0700\n> Junio C Hamano <gitster@pobox.com> wrote:\n>\n>> Steven Rostedt <rostedt@goodmis.org> writes:\n>> \n>> > Hi,\n>> >\n>> > I just want to let you folks know that ktest.pl (tools/testing/ktest/ in\n>> > the Linux kernel repository) parses the output of git to display the first\n>> > bad commit found in an automated git bisect.\n>> >\n>> > The output was recently updated via: 0c0f93e7fa64 (\"bisect: print bisect\n>> > terms in single quotes\") which made ktest.pl fail to find the bad commit.\n>> >\n>> > The change is being addressed:\n>> >\n>> >   https://lore.kernel.org/all/20261009-ktest-git-bisect-v1-1-1d1428f6cbf4@marliere.net/\n>> >\n>> > But I figured it would be good for you to know about this dependency.  \n>> \n>> Shouldn't the script instead seeing \"git show bisect/bad\" instead?\n>\n> Hmm, it also is used to see if the bisect finished or not. It looks at the\n> output of the last git bisect action and has:\n>\n>     if ($output =~ m/^(Bisecting: .*\\(roughly \\d+ \n> steps?\\))\\s+\\[([[:xdigit:]]+)\\]/) {\n> \tdoprint \"$1 [$2]\\n\";\n>     } elsif ($output =~ m/^([[:xdigit:]]+) is the first bad commit/) {\n> \t$bisect_bad_commit = $1;\n> \tdoprint \"Found bad commit... $1\\n\";\n> \treturn 0;\n>     } else {\n> \t# we already logged it, just print it now.\n> \tprint $output;\n>     }\n>     return 1;\n>\n> Where returning 0 means the bad commit has been found.\n> Otherwise it keeps looping.\n\nIs this different from git bisect run?\n\n>\n> Is there a git command to know if the bad bisect has been found or not?\n>\n> -- Steve\n\nSent from mobile\n\n"},{"id":"555617","messageId":"20261020153338.54d60ffb@gandalf.local.home","threadId":"66605","inReplyTo":"83c59078-f6f1-456a-a99b-688eaf56bab0@app.fastmail.com","subject":"Re: FYI, git output messages are being used by other tooling","fromName":"Steven Rostedt","fromEmail":"rostedt@goodmis.org","sentAt":"2026-10-20T19:33:38Z","receivedAt":"2026-10-20T19:33:38Z","isPatch":false,"sender":{"key":"rostedt@goodmis.org","avatar":"https://gravatar.com/avatar/cc188bf330d625ec6a7a2d0b6f4829dc777963e8dab83d943691dc31c5095227?d=mp&s=160"},"body":"On Tue, 20 Oct 2026 21:28:10 +0200\n\"Kristoffer Haugsbakk\" <kristofferhaugsbakk@fastmail.com> wrote:\n\n> > Where returning 0 means the bad commit has been found.\n> > Otherwise it keeps looping.  \n> \n> Is this different from git bisect run?\n\nYes. It's ktest.pl that was created back in 2010 for automated testing of\nLinux kernels. It will build, install, boot and test each kernel and based\non the result it will do a git bisect good/bad.\n\nThus it is much more advanced that \"git bisect run\".\n\n-- Steve\n\n"},{"id":"555634","messageId":"atfmYYtUii4gWIIH@mit.edu","threadId":"66605","inReplyTo":"83c59078-f6f1-456a-a99b-688eaf56bab0@app.fastmail.com","subject":"Re: FYI, git output messages are being used by other tooling","fromName":"Theodore Tso","fromEmail":"tytso@mit.edu","sentAt":"2026-10-20T22:48:36Z","receivedAt":"2026-10-20T22:48:36Z","isPatch":false,"sender":{"key":"tytso@mit.edu","avatar":"https://avatars.githubusercontent.com/u/51416?v=4"},"body":"On Tue, Oct 20, 2026 at 09:28:10PM -0500, Kristoffer Haugsbakk wrote:\n> > Where returning 0 means the bad commit has been found.\n> > Otherwise it keeps looping.\n> \n> Is this different from git bisect run?\n\n\"git bisect run\" isn't always the best way to manage a bisection.  For\nexample, I might run a command like:\n\n   gce-xfstests ltm -c ext4/4k,ext4/1k  generic/245 --repo stable-gc.git \\\n       --bisect-good v6.18.57 --bisect-bad queue/6.18\n\nThis results in an RPC call to the Lightweight Test Manager (ltm),\nwhich is a micro VM running in Google Compute Engine.  If there isn't\na Kernel Compile Service (kcs) VM already launched, the ltm VM will\nlaunch a much larger build VM.  Once the kcs VM is ready, the bisect\nrequest is then forwarded to the kcs VM.  The kcs VM will check out\nrelevant repo, run \"git bisect start\", and will do the build.  Once\nthe kernel is built, it then sends a RPC to the ltm VM, and the ltm VM\nwill launch one or more test VM's (in above example, one for the\next4/4k config, and one of the ext4/1k config).  The ltm VM will\nmonitor the serial console of the systems under test, so if the kernel\nhangs, the ltm VM can force reboot a failing VM and either continue\nwith the next text (if there is more than one test that is being run).\nIf we are doing a bisect, then the ltm VM will send a bisect update to\nthe kcs VM via an RPC.\n\nThis architecture allows multiple biseccts or test watches to be\nmanaged by a single ltm VM and (if necessary the kcs VM --- the kcs VM\nwill shut itself down if it's not needed to save on cloud costs).\n\nSo yeah.  Sometimes \"git bisect run\" isn't really enough, and it would\nbe useful to have a way for programs to be able to call other \"git\nbisect\" subcommands, and have a standardized way to get the results\nfrom the command without having to just parse the output and be\ndependant on the precise format of the human-readable output.\n\nCheers,\n\n\t\t\t\t\t- Ted\n\nP.S.  For more information about how my test appliance works, and the\nother features/functionality of the ltm VM, see [1] and [2].\n\n[1] https://thunk.org/gce-xfstests\n[2] https://github.com/tytso/xfstests-bld/blob/master/Documentation/gce-xfstests.md\n\n\n"},{"id":"555759","messageId":"xmqqse1zotsl.fsf@gitster.g","threadId":"66605","inReplyTo":"ate61iEAj4HDIvzY@mit.edu","subject":"Re: FYI, git output messages are being used by other tooling","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2026-10-21T17:19:38Z","receivedAt":"2026-10-21T17:19:38Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Theodore Tso\" <tytso@mit.edu> writes:\n\n> A structured output that contained the result of the \"git bisect\n> good|bad\", and the first bad commit if it has been found, would be\n> certainly be a more reliable way for automated git bisection harneses\n> to rely upon.  It'd be great if that was something that was in git\n> 3.0.\n\nI am afraid that anything we propose today would be too late for the\n3.0 breaking changes list, but a new optional feature does not have\nto wait for 3.0 at all ;-) I do not know if the format to do so\nshould be .jsonl or .yaml or what, but I agree that machine-readable\nstatus output would be a helpful addition for automation.\n\nThanks.\n\n"},{"id":"555767","messageId":"e1b21ca4-fe77-4aae-8135-a25397efee04@app.fastmail.com","threadId":"66605","inReplyTo":"atfmYYtUii4gWIIH@mit.edu","subject":"Re: FYI, git output messages are being used by other tooling","fromName":"Kristoffer Haugsbakk","fromEmail":"kristofferhaugsbakk@fastmail.com","sentAt":"2026-10-21T17:53:27Z","receivedAt":"2026-10-21T17:53:27Z","isPatch":false,"sender":{"key":"kristofferhaugsbakk@fastmail.com","avatar":null},"body":"On Wed, Oct 21, 2026, at 00:48, Theodore Tso wrote:\n> On Tue, Oct 20, 2026 at 09:28:10PM -0500, Kristoffer Haugsbakk wrote:\n>> > Where returning 0 means the bad commit has been found.\n>> > Otherwise it keeps looping.\n>>\n>> Is this different from git bisect run?\n>\n> \"git bisect run\" isn't always the best way to manage a bisection.  For\n> example, I might run a command like:\n>\n>    gce-xfstests ltm -c ext4/4k,ext4/1k  generic/245 --repo stable-gc.git \\\n>        --bisect-good v6.18.57 --bisect-bad queue/6.18\n>\n>[snip]\n\nThanks for the example. :)\n\n>\n> So yeah.  Sometimes \"git bisect run\" isn't really enough, and it would\n> be useful to have a way for programs to be able to call other \"git\n> bisect\" subcommands, and have a standardized way to get the results\n> from the command without having to just parse the output and be\n> dependant on the precise format of the human-readable output.\n\nYeah, I don’t know about git-bisect(1) subcommands but the `git rev-list\n--bisect*` options showed some promise when I tried them.[1] But the\nmost useful property turned out to be the most annoying thing to figure\nout for me: how to simply query for whether we have found the first bad\ncommit yet or not.\n\nBut maybe that was because I botched the bad/good setup.\n\n† 1: Like for `--bisect-vars`: if it turns out that it is *missing*\n     some useful vars then those could be added without worrying about\n     backwards compatibility.\n\n"},{"id":"555777","messageId":"87a4o6yknm.fsf@igel.home","threadId":"66605","inReplyTo":"ate61iEAj4HDIvzY@mit.edu","subject":"Re: FYI, git output messages are being used by other tooling","fromName":"Andreas Schwab","fromEmail":"schwab@linux-m68k.org","sentAt":"2026-10-21T18:26:53Z","receivedAt":"2026-10-21T18:26:53Z","isPatch":false,"sender":{"key":"schwab@linux-m68k.org","avatar":"https://avatars.githubusercontent.com/u/2175493?v=4"},"body":"On Okt 20 2026, Theodore Tso wrote:\n\n> A structured output that contained the result of the \"git bisect\n> good|bad\", and the first bad commit if it has been found, would be\n> certainly be a more reliable way for automated git bisection harneses\n> to rely upon.  It'd be great if that was something that was in git\n> 3.0.\n\ngut rev-parse --bisect shows the bad and the good revisions.\n\ngit rev-list $(git rev-parse --bisect) | wc -l gives the number of revs\nleft to bisect.\n\n-- \nAndreas Schwab, schwab@linux-m68k.org\nGPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1\n\"And now for something completely different.\"\n\n"}]}