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>
This commit is contained in:
parent
c2d07d24e4
commit
b0bafe0364
@ -1,6 +1,10 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
. git-sh-setup || die "Not a git archive"
|
. git-sh-setup || die "Not a git archive"
|
||||||
|
|
||||||
|
usage () {
|
||||||
|
die "usage: git checkout [-f] [-b <new_branch>] [<branch>] [<paths>...]"
|
||||||
|
}
|
||||||
|
|
||||||
old=$(git-rev-parse HEAD)
|
old=$(git-rev-parse HEAD)
|
||||||
new=
|
new=
|
||||||
force=
|
force=
|
||||||
@ -26,6 +30,9 @@ while [ "$#" != "0" ]; do
|
|||||||
--)
|
--)
|
||||||
break
|
break
|
||||||
;;
|
;;
|
||||||
|
-*)
|
||||||
|
usage
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
if rev=$(git-rev-parse --verify "$arg^0" 2>/dev/null)
|
if rev=$(git-rev-parse --verify "$arg^0" 2>/dev/null)
|
||||||
then
|
then
|
||||||
|
Loading…
Reference in New Issue
Block a user