aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHeikki Orsila <heikki.orsila@iki.fi>2007-11-01 16:21:39 +0200
committerJunio C Hamano <gitster@pobox.com>2007-11-03 21:44:13 -0700
commit19391c371cec06da6cca45dbe3c212bd479cc48c (patch)
tree080aafb2331efd885b74ecc70f3af168e0520a30
parentaa807bc2663d69d6adb1d823231ba4b6d30d4860 (diff)
downloadgit-19391c371cec06da6cca45dbe3c212bd479cc48c.tar.gz
git-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 cca14d6b5..14e58f386 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 0ea3c24f5..3f0069360 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