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

Re: [PATCH] Move format-patch base commit and prerequisites before email signature

From
Junio C Hamano <gitster@pobox.com>
Date
Sep 8, 2016, 18:34 UTC
Message-ID
<xmqqshtags0o.fsf@gitster.mtv.corp.google.com>
In-Reply-To
<20160908011200.qzvbdt4wjwiji4h5@x>
Josh Triplett <josh@joshtriplett.org> writes:
Show 15 quoted lines
> Any text below the "-- " for the email signature gets treated as part of
> the signature, and many mail clients will trim it from the quoted text
> for a reply.  Move it above the signature, so people can reply to it
> more easily.
>
> Add tests for the exact format of the email signature, and add tests to
> ensure the email signature appears last.
>
> (Patch by Junio Hamano; tests by Josh Triplett.)
> Signed-off-by: Josh Triplett <josh@joshtriplett.org>
> ---
>
> Does the above seem reasonable, for a patch that incorporates the
> proposed patch from Message-Id
> xmqqh99rpud4.fsf@gitster.mtv.corp.google.com and adds tests?

Other than that I'd probably retitle it, your problem description looks perfect. I am still not sure if the code does a reasonable thing in MIME case, though.

Thanks for tying the loose ends anyway.
Show 13 quoted lines
> diff --git a/t/t4014-format-patch.sh b/t/t4014-format-patch.sh
> index b0579dd..a4af275 100755
> --- a/t/t4014-format-patch.sh
> +++ b/t/t4014-format-patch.sh
> @@ -754,9 +754,22 @@ test_expect_success 'format-patch --ignore-if-in-upstream HEAD' '
>  	git format-patch --ignore-if-in-upstream HEAD
>  '
>  
> +git_version="$(git --version | sed "s/.* //")"
> +
> +signature() {
> +	printf "%s\n%s\n\n" "-- " "${1:-$git_version}"
> +}

Hmph. I would actually have expected that you would force a fixed and an easily noticeable string via format.signature for the purpose of the test, but I guess this test covers a lot more than what the purpose of the main part of the patch does (i.e. enforces that the default signature must be made from the version string of Git). It is not a bad thing to test, but it probably does not belong to this change. If you _were_ to split the patch in two, that is where I probably would split, i.e. "we didn't test what the default signature looks like, or we didn't make sure --signature option overrides the default signature, so let's test it" as the preliminary preparation, followed by "having base info after sig is inconvenient, let's move it and make sure base info stays before sig with additional test" as the second (and primary) patch.

But a single patch is fine.
Thanks.
Previous: Josh TriplettNext: Josh Triplett
Message 2 of 14 in “Move format-patch base commit and prerequisites before email signature”
  1. Move format-patch base commit and prerequisites before email signatureJosh Triplett, Sep 8, 2016
  2. Junio C HamanoSep 8, 2016
  3. Josh TriplettSep 8, 2016
  4. Junio C HamanoSep 8, 2016
  5. Jeff KingSep 8, 2016
  6. Junio C HamanoSep 8, 2016
  7. Junio C HamanoSep 9, 2016
  8. Josh TriplettSep 9, 2016
  9. Junio C HamanoSep 9, 2016
  10. Josh TriplettSep 9, 2016
  11. Junio C HamanoSep 9, 2016
  12. Junio C HamanoSep 14, 2016
  13. Josh TriplettSep 14, 2016
  14. Junio C HamanoSep 15, 2016

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.