@matheusbsbs / matheus-bagliano / commits / 6b82d16bfc
Fork 0

[PATCH] Make git-checkout failure message more friendly.

... or less so, perhaps ;-). Suggested by Jeff Garzik. Signed-off-by: Junio C Hamano <junkio@cox.net>

Junio C Hamano committed Sep 16, 2005 at 12:30 UTC 6b82d16bfcfffebbb5790b114063e1617d17338a
1 file changed +2 -1
git-checkout.sh
+2 -1
@@ -22,7 +22,8 @@ while [ "$#" != "0" ]; do
22 force=1
23 ;;
24 *)
25 - rev=$(git-rev-parse --verify "$arg^0") || exit
25 + rev=$(git-rev-parse --verify "$arg^0" 2>/dev/null) ||
26 + die "hey dummy, branch '$arg' doesn't exist."
27 if [ -z "$rev" ]; then
28 echo "unknown flag $arg"
29 exit 1