summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 6c5c62f)
raw | patch | inline | side by side (parent: 6c5c62f)
author | Josef Weidendorfer <Josef.Weidendorfer@gmx.de> | |
Wed, 15 Feb 2006 19:22:11 +0000 (20:22 +0100) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Thu, 16 Feb 2006 03:14:04 +0000 (19:14 -0800) |
Signed-off-by: Josef Weidendorfer <Josef.Weidendorfer@gmx.de>
Signed-off-by: Junio C Hamano <junkio@cox.net>
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 76e7f5522646e816ea506f3df1fc0ab0a9d0a277..463ed2eaff906edaeb0f6d3f8138798e373c6495 100755 (executable)
--- a/git-checkout.sh
+++ b/git-checkout.sh
[ -e "$GIT_DIR/refs/heads/$newbranch" ] &&
die "git checkout: branch $newbranch already exists"
git-check-ref-format "heads/$newbranch" ||
- die "we do not like '$newbranch' as a branch name."
+ die "git checkout: we do not like '$newbranch' as a branch name."
;;
"-f")
force=1
if test "$#" -ge 1
then
+ hint=
+ if test "$#" -eq 1
+ then
+ hint="
+Did you intend to checkout '$@' which can not be resolved as commit?"
+ fi
if test '' != "$newbranch$force$merge"
then
- die "updating paths and switching branches or forcing are incompatible."
+ die "git checkout: updating paths is incompatible with switching branches/forcing$hint"
fi
if test '' != "$new"
then
[ -z "$branch$newbranch" ] &&
[ "$new" != "$old" ] &&
- die "git checkout: you need to specify a new branch name"
+ die "git checkout: to checkout the requested commit you need to specify
+ a name for a new branch which is created and switched to"
if [ "$force" ]
then