summaryrefslogtreecommitdiff
path: root/git-bisect.sh
diff options
context:
space:
mode:
authorChristian Couder <chriscool@tuxfamily.org>2008-04-16 02:09:49 (GMT)
committerJunio C Hamano <gitster@pobox.com>2008-04-16 05:42:19 (GMT)
commit48949a18c852e5119827278c37f791921e640688 (patch)
treea53581d2976fb60d0aa07260be047f3f7654f272 /git-bisect.sh
parent1da16439bece6b90e1ce033bc50c5316f2c5dac2 (diff)
downloadgit-48949a18c852e5119827278c37f791921e640688.zip
git-48949a18c852e5119827278c37f791921e640688.tar.gz
git-48949a18c852e5119827278c37f791921e640688.tar.bz2
bisect: squelch "fatal: ref HEAD not a symref" misleading message
To get the current HEAD when we start bisecting using for example "git bisect start", we first try "git symbolic-ref HEAD" to get a nice name, and if it fails, we fall back to "git rev-parse --verify HEAD". The problem is that when "git symbolic-ref HEAD" fails, it displays "fatal: ref HEAD not a symref", so it looks like "git bisect start" failed and does not accept detached HEAD, even if in fact it worked fine. This patch adds "-q" option to the "git symbolic-ref" call to get rid of the misleading error message. Signed-off-by: Christian Couder <chriscool@tuxfamily.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-bisect.sh')
-rwxr-xr-xgit-bisect.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/git-bisect.sh b/git-bisect.sh
index c99ffee..dd91bd5 100755
--- a/git-bisect.sh
+++ b/git-bisect.sh
@@ -62,7 +62,7 @@ bisect_start() {
# Verify HEAD. If we were bisecting before this, reset to the
# top-of-line master first!
#
- head=$(GIT_DIR="$GIT_DIR" git symbolic-ref HEAD) ||
+ head=$(GIT_DIR="$GIT_DIR" git symbolic-ref -q HEAD) ||
head=$(GIT_DIR="$GIT_DIR" git rev-parse --verify HEAD) ||
die "Bad HEAD - I need a HEAD"
case "$head" in