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>
Chris Shoemaker committed
Oct 29, 2005 at 17:46 UTC
b0bafe0364860ba45b74a5aec5b920213d5caa34
1 file changed
+7
git-checkout.sh
+7
@@ -1,6 +1,10 @@
1
#!/bin/sh
2
. git-sh-setup || die "Not a git archive"
3
4
+usage () {
5
+ die "usage: git checkout [-f] [-b <new_branch>] [<branch>] [<paths>...]"
6
+}
7
+
8
old=$(git-rev-parse HEAD)
9
new=
10
force=
@@ -26,6 +30,9 @@ while [ "$#" != "0" ]; do
30
--)
31
break
32
;;
33
+ -*)
34
+ usage
35
+ ;;
36
*)
37
if rev=$(git-rev-parse --verify "$arg^0" 2>/dev/null)
38
then