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:
authorJonathan Tan <jonathantanmy@google.com>2018-05-02 03:31:29 +0300
committerJunio C Hamano <gitster@pobox.com>2018-05-02 12:54:32 +0300
commit7cc6ed2d06d6631726af9c14b5258d723c513327 (patch)
treedc185e5d974f897459342e573e51b3f9a71ece8c /t/t5701-git-serve.sh
parentea44c0a5940c183023797eb54cd7912709f421b0 (diff)
upload-pack: fix error message typo
Fix a typo in an error message. Also, this line was introduced in 3145ea957d2c ("upload-pack: introduce fetch server command", 2018-03-15), which did not contain a test for the case which causes this error to be printed, so introduce a test. Signed-off-by: Jonathan Tan <jonathantanmy@google.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t5701-git-serve.sh')
-rwxr-xr-xt/t5701-git-serve.sh14
1 files changed, 14 insertions, 0 deletions
diff --git a/t/t5701-git-serve.sh b/t/t5701-git-serve.sh
index 72d7bc5628..1b4b13cc2b 100755
--- a/t/t5701-git-serve.sh
+++ b/t/t5701-git-serve.sh
@@ -173,4 +173,18 @@ test_expect_success 'symrefs parameter' '
test_cmp actual expect
'
+test_expect_success 'unexpected lines are not allowed in fetch request' '
+ git init server &&
+
+ test-pkt-line pack >in <<-EOF &&
+ command=fetch
+ 0001
+ this-is-not-a-command
+ 0000
+ EOF
+
+ test_must_fail git -C server serve --stateless-rpc <in >/dev/null 2>err &&
+ grep "unexpected line: .this-is-not-a-command." err
+'
+
test_done