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>
Christian Couder committed
Apr 16, 2008 at 04:09 UTC
48949a18c852e5119827278c37f791921e640688
1 file changed
+1
-1
git-bisect.sh
+1
-1
@@ -62,7 +62,7 @@ bisect_start() {
62
# Verify HEAD. If we were bisecting before this, reset to the
63
# top-of-line master first!
64
#
65
- head=$(GIT_DIR="$GIT_DIR" git symbolic-ref HEAD) ||
65
+ head=$(GIT_DIR="$GIT_DIR" git symbolic-ref -q HEAD) ||
66
head=$(GIT_DIR="$GIT_DIR" git rev-parse --verify HEAD) ||
67
die "Bad HEAD - I need a HEAD"
68
case "$head" in