summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Shoemaker <c.shoemaker@cox.net>2005-10-29 21:46:41 (GMT)
committerJunio C Hamano <junkio@cox.net>2005-10-31 01:28:00 (GMT)
commitb0bafe0364860ba45b74a5aec5b920213d5caa34 (patch)
tree166b78e57051b1d4c86eeb997a1db922156486a9
parentc2d07d24e48fd7109ac4c717bcdc6b82609ece1a (diff)
downloadgit-b0bafe0364860ba45b74a5aec5b920213d5caa34.zip
git-b0bafe0364860ba45b74a5aec5b920213d5caa34.tar.gz
git-b0bafe0364860ba45b74a5aec5b920213d5caa34.tar.bz2
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>
-rwxr-xr-xgit-checkout.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/git-checkout.sh b/git-checkout.sh
index 73652fa..cb33fdc 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