projects
/
git.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0e60471
)
[PATCH] Make git-checkout failure message more friendly.
author
Junio C Hamano
<junkio@cox.net>
Fri, 16 Sep 2005 19:30:46 +0000
(12:30 -0700)
committer
Junio C Hamano
<junkio@cox.net>
Fri, 16 Sep 2005 22:16:40 +0000
(15:16 -0700)
... or less so, perhaps ;-). Suggested by Jeff Garzik.
Signed-off-by: Junio C Hamano <junkio@cox.net>
git-checkout.sh
patch
|
blob
|
history
diff --git
a/git-checkout.sh
b/git-checkout.sh
index 4a605cd9c6d76dc99ab0574dc3571db3b64e509c..e02c7afbaed52e83a01a68a65ff950b07c04f839 100755
(executable)
--- 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