From: Alejandro Colomar <alx@kernel.org>
To: "D. Ben Knoble" <ben.knoble@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: git-visualize(1) plumbing equivalent
Date: Sat, 3 Oct 2026 19:50:28 +0200 [thread overview]
Message-ID: <asFAEwomFDbC2Dec@debian> (raw)
In-Reply-To: <CALnO6CAsd36-XEnRQWNhAsmH7Bg6ZoHv7qb2xQ1m0cW4-Decmw@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 2015 bytes --]
Hi Ben,
> Date: 2026-10-03 13:10:43-0400
> From: "D. Ben Knoble" <ben.knoble@gmail.com>
>
> On Sat, Oct 3, 2026 at 11:13 AM Alejandro Colomar <alx@kernel.org> wrote:
> >
> > Hi Ben,
> >
> > > Date: 2026-10-03 09:45:17-0400
> > > From: "D. Ben Knoble" <ben.knoble@gmail.com>
> > >
> > > On Sat, Oct 3, 2026 at 6:13 AM Alejandro Colomar <alx@kernel.org> wrote:
>
> [snip]
>
> > > > Having read the documentation for git-bisect(1), visualize reads several
> > > > environment variables, and thus this code doesn't seem robust. What
> > > > would be the plumbing version of the while-loop condition?
> > > >
> > > > git bisect visualize --oneline \
> > > > | wc -l \
> > > > | xargs -I{} test {} -gt 1;
> > > >
> > > > The goal is to know whether git-bisect(1) has found a commit yet or not,
> > > > to stop looping.
> > >
> > > I think you are probably looking for the (size of the) set of commits
> > > between bisect/bad and all the bisect/good-* refs. So you might need
> > > to "git refs list" the good ones, and feed those as negated refs
> > > alongside bisect/bad to rev-list?
> >
> > Yup, this seems to work:
> >
> > git refs list | grep refs/bisect/ | sed '/good/s/^/^/' | cut -f1 -d' ' | xargs git rev-list
> >
> > >
> > > In the general case, that wouldn't account for skipped commits as I
> > > understand it, where multiple commits are left at the end of the
> > > bisect, but in your script it doesn't look like you skip any.
> >
> > Hmmmm. I'm now working on adding the ability to skip commits, so this
> > would be a problem. Do you have any idea on how to deal with that?
>
> Not offhand, sorry :/ I'm not totally sure how bisect represents that state.
Thanks anyway! I think this is getting hard enough, that it might be
worth piping a heredocument into a mktemp(1) file within the script, and
passing that to 'git bisect run'.
Cheers,
Alex
--
<https://www.alejandro-colomar.es>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2026-10-03 17:50 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-03 10:10 git-visualize(1) plumbing equivalent Alejandro Colomar
2026-10-03 13:45 ` D. Ben Knoble
2026-10-03 15:13 ` Alejandro Colomar
2026-10-03 17:10 ` D. Ben Knoble
2026-10-03 17:50 ` Alejandro Colomar [this message]
2026-10-03 15:26 ` Kristoffer Haugsbakk
2026-10-03 17:09 ` D. Ben Knoble
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=asFAEwomFDbC2Dec@debian \
--to=alx@kernel.org \
--cc=ben.knoble@gmail.com \
--cc=git@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.