# Remove total confusion from "git checkout"

1 messages from 2005-09-19 to 2005-09-19. Participants: Linus Torvalds.
Thread: https://gitlist.dev/t/1861

## Linus Torvalds, 2005-09-19 17:11

Subject: Remove total confusion from "git checkout"
Message-ID: <Pine.LNX.4.58.0509191009041.9106@g5.osdl.org>
URL: https://gitlist.dev/e/Pine.LNX.4.58.0509191009041.9106%40g5.osdl.org

```

The target to check out does not need to be a branch. The _result_ of the 
checkout needs to be a branch. Don't confuse the two, and then insult the 
user.

Insulting is ok, but I personally get really pissed off is a tool is both 
confused and insulting. At least be _correct_ and insulting.

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
---
diff --git a/git-checkout.sh b/git-checkout.sh
--- a/git-checkout.sh
+++ b/git-checkout.sh
@@ -23,7 +23,7 @@ while [ "$#" != "0" ]; do
 		;;
 	*)
 		rev=$(git-rev-parse --verify "$arg^0" 2>/dev/null) ||
-			die "hey dummy, branch '$arg' doesn't exist."
+			die "I don't know any '$arg'."
 		if [ -z "$rev" ]; then
 			echo "unknown flag $arg"
 			exit 1

```
