From 6b82d16bfcfffebbb5790b114063e1617d17338a Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Fri, 16 Sep 2005 12:30:46 -0700 Subject: [PATCH] [PATCH] Make git-checkout failure message more friendly. ... or less so, perhaps ;-). Suggested by Jeff Garzik. Signed-off-by: Junio C Hamano --- git-checkout.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/git-checkout.sh b/git-checkout.sh index 4a605cd9..e02c7afb 100755 --- a/git-checkout.sh +++ b/git-checkout.sh @@ -22,7 +22,8 @@ while [ "$#" != "0" ]; do force=1 ;; *) - rev=$(git-rev-parse --verify "$arg^0") || exit + rev=$(git-rev-parse --verify "$arg^0" 2>/dev/null) || + die "hey dummy, branch '$arg' doesn't exist." if [ -z "$rev" ]; then echo "unknown flag $arg" exit 1 -- 2.11.0