summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 5736a37)
raw | patch | inline | side by side (parent: 5736a37)
author | Junio C Hamano <gitster@pobox.com> | |
Wed, 23 Apr 2008 17:53:47 +0000 (10:53 -0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Mon, 28 Apr 2008 04:47:39 +0000 (21:47 -0700) |
"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>
excess-garbage without giving any diagnostic message. Fix it.
Signed-off-by: Junio C Hamano <gitster@pobox.com>
git-clone.sh | patch | blob | history | |
t/t5601-clone.sh | [new file with mode: 0755] | patch | blob |
diff --git a/git-clone.sh b/git-clone.sh
index 2636159aaa7a6278d9b8fc64b853b319ac8da123..9e433c08086f3a80c91cc9dae1e48c88723b82f8 100755 (executable)
--- a/git-clone.sh
+++ b/git-clone.sh
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
diff --git a/t/t5601-clone.sh b/t/t5601-clone.sh
--- /dev/null
+++ b/t/t5601-clone.sh
@@ -0,0 +1,26 @@
+#!/bin/sh
+
+test_description=clone
+
+. ./test-lib.sh
+
+test_expect_success setup '
+
+ rm -fr .git &&
+ test_create_repo src &&
+ (
+ cd src
+ >file
+ git add file
+ git commit -m initial
+ )
+
+'
+
+test_expect_success 'clone with excess parameters' '
+
+ test_must_fail git clone -n "file://$(pwd)/src" dst junk
+
+'
+
+test_done