git/list[1] front-page[2] threads[3] people[4] search[5] about
 

git-visualize(1) plumbing equivalent

From
ACAlejandro Colomar <alx@kernel.org>
Date
Oct 3, 2026, 10:10 UTC
Message-ID
<asDTWsH-RuIJOyne@debian>
Hi!
I have this code, which I use to loop in a script using git-bisect(1):
	while
		git bisect visualize --oneline \
		| wc -l \
		| xargs -I{} test {} -gt 1;
	do
		if
			git rebase $gropts BISECT_HEAD >/dev/null 2>/dev/null;
			test $? -eq 0;
		then
			echo 'Rebase: success';
			git bisect good BISECT_HEAD;
		else
			echo 'Rebase: conflict';
			git rebase --abort >/dev/null;
			git bisect bad BISECT_HEAD;
		fi;
	done;

( I know this resembles "git rebase run", but I'm avoiding it, because passing all of that as a command is non-trivial (and I'd like to avoid having to write a separate script to pass its name to "git bisect run"). )

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.

Have a lovely day! Alex

-- 
<https://www.alejandro-colomar.es>
Next: D. Ben Knoble
Message 1 of 7 in “git-visualize(1) plumbing equivalent”
  1. Alejandro ColomarOct 3, 2026
  2. D. Ben KnobleOct 3, 2026
  3. Alejandro ColomarOct 3, 2026
  4. Kristoffer HaugsbakkOct 3, 2026
  5. D. Ben KnobleOct 3, 2026
  6. D. Ben KnobleOct 3, 2026
  7. Alejandro ColomarOct 3, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.