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

[PATCH] Bisect visualize: use "for-each-ref" to list all good refs.

From
Christian Couder <chriscool@tuxfamily.org>
Date
Nov 14, 2007, 04:50 UTC
Message-ID
<20071114055036.2c5ae793.chriscool@tuxfamily.org>

In bisect_visualize, "cd $GIT_DIR/refs && echo bisect/good-*" was still used instead of "git for-each-ref". This patch fix it.

We now pass "refs/bisect/bad" and "--not refs/bisect/good-<rev>" instead of "bisect/bad" and "--not bisect/good-<rev>" to gitk, but it seems to work.

Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
---
 git-bisect.sh |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/git-bisect.sh b/git-bisect.sh
index 1ed44e5..8d75d91 100755
--- a/git-bisect.sh
+++ b/git-bisect.sh
@@ -326,8 +326,8 @@ bisect_next() {
 
 bisect_visualize() {
 	bisect_next_check fail
-	not=`cd "$GIT_DIR/refs" && echo bisect/good-*`
-	eval gitk bisect/bad --not $not -- $(cat "$GIT_DIR/BISECT_NAMES")
+	not=$(git for-each-ref --format='%(refname)' "refs/bisect/good-*")
+	eval gitk refs/bisect/bad --not $not -- $(cat "$GIT_DIR/BISECT_NAMES")
 }
 
 bisect_reset() {
-- 
1.5.3.5.629.g807b3
Next: Junio C Hamano
Message 1 of 4 in “Bisect visualize: use "for-each-ref" to list all good refs.”
  1. Bisect visualize: use "for-each-ref" to list all good refs.Christian Couder, Nov 14, 2007
  2. Junio C HamanoNov 14, 2007
  3. Johannes SixtNov 14, 2007
  4. Christian CouderNov 15, 2007

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.