threads / patch / 7400

patchBisect: Use "git-show-ref --verify" when reseting.

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

## tl;dr

One message between Mar 26, 2007 and Mar 26, 2007. Diffs are folded; open one to read it.

replies: 0people: 1as markdown or json

Christian Couder· Mar 26, 2007, 04:14 UTC · lore
Signed-off-by: Christian Couder <chriscool@tuxfamily.org>
---
 git-bisect.sh |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Show changes to git-bisect.sh +1 −1
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

← back to recent threads