1
0
Fork 0
mirror of https://github.com/git/git.git synced 2024-10-28 12:59:41 +01:00

upload-pack: fix error message typo

Fix a typo in an error message.

Also, this line was introduced in 3145ea957d ("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>
This commit is contained in:
Jonathan Tan 2018-05-01 17:31:29 -07:00 committed by Junio C Hamano
parent ea44c0a594
commit 7cc6ed2d06
2 changed files with 15 additions and 1 deletions

View file

@ -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

View file

@ -1252,7 +1252,7 @@ static void process_args(struct packet_reader *request,
}
/* ignore unknown lines maybe? */
die("unexpect line: '%s'", arg);
die("unexpected line: '%s'", arg);
}
}