git/list[1] front-page[2] threads[3] people[4] search[5] about
 

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
Previous: Luca Weiss via GitGitGadgetNext: Luca Weiss via GitGitGadget
Message 3 of 17 in “Normalize newlines in merge & interpret-trailer”
  1. 0/2 Normalize newlines in merge & interpret-trailerLuca Weiss via GitGitGadget, Jul 16, 2021
  2. 1/2 trailer: handle input without trailing newlineLuca Weiss via GitGitGadget, Jul 16, 2021
  3. Jeff KingJul 16, 2021
  4. 2/2 merge: make sure to terminate message with newlineLuca Weiss via GitGitGadget, Jul 16, 2021
  5. Phillip WoodJul 16, 2021
  6. Luca WeissJul 16, 2021
  7. Phillip WoodJul 16, 2021
  8. Jeff KingJul 16, 2021
  9. Junio C HamanoJul 16, 2021
  10. Jeff KingJul 16, 2021
  11. Junio C HamanoJul 16, 2021
  12. Phillip WoodJul 17, 2021
  13. Jeff KingJul 17, 2021
  14. Luca WeissJul 21, 2021
  15. Luca WeissAug 26, 2021
  16. Junio C HamanoJul 16, 2021
  17. Junio C HamanoJul 16, 2021

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.