diff options
author | Junio C Hamano <gitster@pobox.com> | 2008-04-23 19:53:47 +0200 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2008-04-28 06:47:39 +0200 |
commit | a2b26acd7afb4d77d8844ccd681e993f25e75205 (patch) | |
tree | c224e3cfdbd8bab90ff9216e22b9104e413e83e6 /t/t5601-clone.sh | |
parent | Merge branch 'maint-1.5.4' into maint (diff) | |
download | git-a2b26acd7afb4d77d8844ccd681e993f25e75205.tar.xz git-a2b26acd7afb4d77d8844ccd681e993f25e75205.zip |
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 '')
-rwxr-xr-x | t/t5601-clone.sh | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/t/t5601-clone.sh b/t/t5601-clone.sh new file mode 100755 index 0000000000..dc9d63dbf9 --- /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 |