summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLibravatar Heikki Orsila <heikki.orsila@iki.fi>2007-11-01 16:21:39 +0200
committerLibravatar Junio C Hamano <gitster@pobox.com>2007-11-03 21:44:13 -0700
commit19391c371cec06da6cca45dbe3c212bd479cc48c (patch)
tree080aafb2331efd885b74ecc70f3af168e0520a30
parentgit-svn: sort the options in the --help message. (diff)
downloadtgif-19391c371cec06da6cca45dbe3c212bd479cc48c.tar.xz
git-clone: honor "--" to end argument parsing
Signed-off-by: Heikki Orsila <heikki.orsila@iki.fi>
-rw-r--r--Documentation/git-clone.txt2
-rwxr-xr-xgit-clone.sh5
2 files changed, 5 insertions, 2 deletions
diff --git a/Documentation/git-clone.txt b/Documentation/git-clone.txt
index cca14d6b5d..14e58f3866 100644
--- a/Documentation/git-clone.txt
+++ b/Documentation/git-clone.txt
@@ -12,7 +12,7 @@ SYNOPSIS
'git-clone' [--template=<template_directory>]
[-l] [-s] [--no-hardlinks] [-q] [-n] [--bare]
[-o <name>] [-u <upload-pack>] [--reference <repository>]
- [--depth <depth>] <repository> [<directory>]
+ [--depth <depth>] [--] <repository> [<directory>]
DESCRIPTION
-----------
diff --git a/git-clone.sh b/git-clone.sh
index 0ea3c24f59..3f00693608 100755
--- a/git-clone.sh
+++ b/git-clone.sh
@@ -14,7 +14,7 @@ die() {
}
usage() {
- die "Usage: $0 [--template=<template_directory>] [--reference <reference-repo>] [--bare] [-l [-s]] [-q] [-u <upload-pack>] [--origin <name>] [--depth <n>] [-n] <repo> [<dir>]"
+ die "Usage: $0 [--template=<template_directory>] [--reference <reference-repo>] [--bare] [-l [-s]] [-q] [-u <upload-pack>] [--origin <name>] [--depth <n>] [-n] [--] <repo> [<dir>]"
}
get_repo_base() {
@@ -160,6 +160,9 @@ while
*,--depth)
shift
depth="--depth=$1";;
+ *,--)
+ shift
+ break ;;
*,-*) usage ;;
*) break ;;
esac