summaryrefslogtreecommitdiff
path: root/git-checkout.sh
diff options
context:
space:
mode:
authorChris Shoemaker <c.shoemaker@cox.net>2005-10-29 17:46:41 -0400
committerJunio C Hamano <junkio@cox.net>2005-10-30 17:28:00 -0800
commitb0bafe0364860ba45b74a5aec5b920213d5caa34 (patch)
tree166b78e57051b1d4c86eeb997a1db922156486a9 /git-checkout.sh
parentc2d07d24e48fd7109ac4c717bcdc6b82609ece1a (diff)
downloadgit-b0bafe0364860ba45b74a5aec5b920213d5caa34.tar.gz
Add usage statement to git-checkout.sh
Signed-off-by: Chris Shoemaker <c.shoemaker@cox.net> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'git-checkout.sh')
-rwxr-xr-xgit-checkout.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/git-checkout.sh b/git-checkout.sh
index 73652fa5f3..cb33fdc7e2 100755
--- a/git-checkout.sh
+++ b/git-checkout.sh
@@ -1,6 +1,10 @@
#!/bin/sh
. git-sh-setup || die "Not a git archive"
+usage () {
+ die "usage: git checkout [-f] [-b <new_branch>] [<branch>] [<paths>...]"
+}
+
old=$(git-rev-parse HEAD)
new=
force=
@@ -26,6 +30,9 @@ while [ "$#" != "0" ]; do
--)
break
;;
+ -*)
+ usage
+ ;;
*)
if rev=$(git-rev-parse --verify "$arg^0" 2>/dev/null)
then