Re: [PATCH v2 1/3] upload-pack: fix error message typo
- From
Stefan Beller <sbeller@google.com>
- Date
- May 3, 2018, 18:58 UTC
- Message-ID
- <CAGZ79kbTwqzKgZjN7GSXn-NpKX0kkDVYbXmdz6CC6TrDWbqyQg@mail.gmail.com>
- In-Reply-To
- <177c6eb7058adc1996f0595ddc3cc848c91b578f.1525220786.git.jonathantanmy@google.com>
On Tue, May 1, 2018 at 5:31 PM, Jonathan Tan <jonathantanmy@google.com> wrote:
Show 7 quoted lines
> 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>This is Reviewed-by: Stefan Beller <sbeller@google.com>
Show 24 quoted lines
> --- > t/t5701-git-serve.sh | 14 ++++++++++++++ > upload-pack.c | 2 +- > 2 files changed, 15 insertions(+), 1 deletion(-) > > diff --git a/t/t5701-git-serve.sh b/t/t5701-git-serve.sh > index 72d7bc562..1b4b13cc2 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 &&
Minor nit: Why do we pipe stdout to /dev/null ?