summaryrefslogtreecommitdiff
path: root/git-checkout.sh
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <junkio@cox.net>2005-09-18 01:18:15 -0700
committerLibravatar Junio C Hamano <junkio@cox.net>2005-09-18 01:18:15 -0700
commit8ac93bc98f5e868e890e1a740df9f0c6513189c8 (patch)
treec1c1e3c93a3ca5adc86d67d4d55544bab09f2586 /git-checkout.sh
parentMerge branch 'master' of . (diff)
parentImprove the safety check used in fetch.c (diff)
downloadtgif-8ac93bc98f5e868e890e1a740df9f0c6513189c8.tar.xz
Merge branch 'master' of .
Diffstat (limited to 'git-checkout.sh')
-rwxr-xr-xgit-checkout.sh3
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