Re: [PATCH 1/2] trailer: handle input without trailing newline
- From
Jeff King <peff@peff.net>
- Date
- Jul 16, 2021, 19:35 UTC
- Message-ID
- <YPHfgyR5ZS2pPr0P@coredump.intra.peff.net>
- In-Reply-To
- <c17ff7ac483ad3990680a3bb1b67898564eb9379.1626421416.git.gitgitgadget@gmail.com>
On Fri, Jul 16, 2021 at 07:43:35AM +0000, Luca Weiss via GitGitGadget wrote:
> From: Luca Weiss <luca@z3ntu.xyz> > > Add a corresponding test case for this as well
The details you put in the cover letter won't make it into the Git history. This would be a good place to put them.
> t/t7513-interpret-trailers.sh | 7 +++++++ > trailer.c | 3 +++ > 2 files changed, 10 insertions(+)
That patch itself looks good to me, with one minor style nit:
Show 9 quoted lines
> diff --git a/t/t7513-interpret-trailers.sh b/t/t7513-interpret-trailers.sh > index 04885d0a5e5..ff5f1724ad0 100755 > --- a/t/t7513-interpret-trailers.sh > +++ b/t/t7513-interpret-trailers.sh > @@ -17,6 +17,7 @@ test_expect_success 'setup' ' > > body > EOF > + printf "subject\n\nbody" > basic_message_no_eol &&
Our preferred style is to omit whitespace between redirection operators and filenames (i.e., ">basic_message_no_eol").
Show 5 quoted lines
> +test_expect_success 'with message without trailing newline twice' ' > + git interpret-trailers --trailer "Cc: Peff" basic_message_no_eol > intermediary && > + git interpret-trailers --trailer "Cc: Peff" intermediary > actual && > + test_cmp intermediary actual > +'
Ditto here.
-Peff