Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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