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

[PATCH] Bisect: Use "git-show-ref --verify" when reseting.

From
Christian Couder <chriscool@tuxfamily.org>
Date
Mar 26, 2007, 04:14 UTC
Message-ID
<20070326061440.26f506d4.chriscool@tuxfamily.org>
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
---
 git-bisect.sh |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/git-bisect.sh b/git-bisect.sh
index 936b4a4..fda1712 100755
--- a/git-bisect.sh
+++ b/git-bisect.sh
@@ -173,7 +173,7 @@ bisect_reset() {
 	   else
 	       branch=master
 	   fi ;;
-	1) test -f "$GIT_DIR/refs/heads/$1" || {
+	1) git-show-ref --verify --quiet -- "refs/heads/$1" || {
 	       echo >&2 "$1 does not seem to be a valid branch"
 	       exit 1
 	   }
-- 
1.5.1.rc2.1.g850a
Message 1 of 1 in “Bisect: Use "git-show-ref --verify" when reseting.”
  1. Bisect: Use "git-show-ref --verify" when reseting.Christian Couder, Mar 26, 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.