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:
authorJunio C Hamano <gitster@pobox.com>2008-04-23 21:53:47 +0400
committerJunio C Hamano <gitster@pobox.com>2008-04-28 08:47:39 +0400
commita2b26acd7afb4d77d8844ccd681e993f25e75205 (patch)
treec224e3cfdbd8bab90ff9216e22b9104e413e83e6 /git-clone.sh
parent5736a3747120d6215de4fdfcf45f4a168a8d024e (diff)
clone: detect and fail on excess parameters
"git clone [options] $src $dst excess-garbage" simply ignored excess-garbage without giving any diagnostic message. Fix it. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'git-clone.sh')
-rwxr-xr-xgit-clone.sh1
1 files changed, 1 insertions, 0 deletions
diff --git a/git-clone.sh b/git-clone.sh
index 2636159aaa..9e433c0808 100755
--- a/git-clone.sh
+++ b/git-clone.sh
@@ -219,6 +219,7 @@ fi
if test -n "$2"
then
dir="$2"
+ test $# == 2 || die "excess parameter to git-clone"
else
# Derive one from the repository name
# Try using "humanish" part of source repo if user didn't specify one