From 19391c371cec06da6cca45dbe3c212bd479cc48c Mon Sep 17 00:00:00 2001 From: Heikki Orsila Date: Thu, 1 Nov 2007 16:21:39 +0200 Subject: [PATCH] git-clone: honor "--" to end argument parsing Signed-off-by: Heikki Orsila --- Documentation/git-clone.txt | 2 +- git-clone.sh | 5 ++++- 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=] [-l] [-s] [--no-hardlinks] [-q] [-n] [--bare] [-o ] [-u ] [--reference ] - [--depth ] [] + [--depth ] [--] [] 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=] [--reference ] [--bare] [-l [-s]] [-q] [-u ] [--origin ] [--depth ] [-n] []" + die "Usage: $0 [--template=] [--reference ] [--bare] [-l [-s]] [-q] [-u ] [--origin ] [--depth ] [-n] [--] []" } get_repo_base() { @@ -160,6 +160,9 @@ while *,--depth) shift depth="--depth=$1";; + *,--) + shift + break ;; *,-*) usage ;; *) break ;; esac -- 2.30.2