diff options
author | Junio C Hamano <junkio@cox.net> | 2005-09-16 12:30:46 -0700 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2005-09-16 15:16:40 -0700 |
commit | 6b82d16bfcfffebbb5790b114063e1617d17338a (patch) | |
tree | c28529964c1673fa7c11e6c4ee12401f09bf5690 /git-checkout.sh | |
parent | 0e60471c2a30882b9b44ebfd699d2414a0a348cc (diff) | |
download | git-6b82d16bfcfffebbb5790b114063e1617d17338a.tar.gz |
[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>
Diffstat (limited to 'git-checkout.sh')
-rwxr-xr-x | git-checkout.sh | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/git-checkout.sh b/git-checkout.sh index 4a605cd9c6..e02c7afbae 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 |