[PATCH] Improve git bisect error message

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Andi Kleen
Date: Saturday, April 26, 2008 - 6:39 am

It took me some time to figure out what this error message meant and
how to fix the problem.  So let's improve it a little.

-Andi

--- git-1.5.4/git-bisect~	2008-02-09 13:37:16.000000000 +0100
+++ git-1.5.4/git-bisect	2008-04-26 01:26:19.000000000 +0200
@@ -71,7 +71,10 @@
 		git checkout $branch || exit
 		;;
 	refs/heads/*)
-		[ -s "$GIT_DIR/head-name" ] && die "won't bisect on seeked tree"
+		if [ -s "$GIT_DIR/head-name" ] ; then
+			echo >&2 "Please run git bisect reset"
+			die "won't bisect on seeked tree"
+		fi
 		echo "${head#refs/heads/}" >"$GIT_DIR/head-name"
 		;;
 	*)
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] Improve git bisect error message, Andi Kleen, (Sat Apr 26, 6:39 am)
Re: [PATCH] Improve git bisect error message, Christian Couder, (Sat Apr 26, 11:53 am)