Skip to content

Commit

Permalink
Merge branch 'maint'
Browse files Browse the repository at this point in the history
* maint:
  clone: detect and fail on excess parameters
  Remove 'header' from --signoff option description
  • Loading branch information
Junio C Hamano committed Apr 28, 2008
2 parents 07ba53f + a2b26ac commit 633d1fe
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 1 deletion.
2 changes: 1 addition & 1 deletion builtin-commit.c
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ static struct option builtin_commit_options[] = {
OPT_CALLBACK('m', "message", &message, "MESSAGE", "specify commit message", opt_parse_m),
OPT_STRING('c', "reedit-message", &edit_message, "COMMIT", "reuse and edit message from specified commit "),
OPT_STRING('C', "reuse-message", &use_message, "COMMIT", "reuse message from specified commit"),
OPT_BOOLEAN('s', "signoff", &signoff, "add Signed-off-by: header"),
OPT_BOOLEAN('s', "signoff", &signoff, "add Signed-off-by:"),
OPT_STRING('t', "template", &template_file, "FILE", "use specified template file"),
OPT_BOOLEAN('e', "edit", &edit_flag, "force edit of commit"),

Expand Down
1 change: 1 addition & 0 deletions git-clone.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
26 changes: 26 additions & 0 deletions t/t5601-clone.sh
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit 633d1fe

Please sign in to comment.