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

Re: [PATCH 3/3] format-patch: preserve subject newlines with -k

From
Junio C Hamano <gitster@pobox.com>
Date
May 26, 2011, 21:18 UTC
Message-ID
<7vboypw47q.fsf@alter.siamese.dyndns.org>
In-Reply-To
<20110526205504.GC31340@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
> We have always treated multi-line subjects as second-class citizens, so
> this is not a must-have patch. But I think it makes sense to do,
> considering how simple it is, and the fact that it makes "format-patch
> -k | am -k" always a no-op, even with multi-line subjects.

I think this is a good thing to have, as the reason why we treated multi-line subjects as second-class citizens is exactly because we didn't try to stuff multiple lines on "Subject:" like you did with this patch.

Show 10 quoted lines
> diff --git a/builtin/log.c b/builtin/log.c
> index d8c6c28..3fdf488 100644
> --- a/builtin/log.c
> +++ b/builtin/log.c
> @@ -768,7 +768,7 @@ static void make_cover_letter(struct rev_info *rev, int use_stdout,
>  	pp_user_info(NULL, CMIT_FMT_EMAIL, &sb, committer, DATE_RFC2822,
>  		     encoding);
>  	pp_title_line(CMIT_FMT_EMAIL, &msg, &sb, subject_start, extra_headers,
> -		      encoding, need_8bit_cte);
> +		      encoding, need_8bit_cte, 0);

I do not appreciate a single-bit tweak as separate parameter to a function. Back when pp_title_line() had only "do we need 8-bit cte", it was Ok, but now that you are adding another bit, could we make it an "unsigned flag"?

Previous: Jeff KingNext: Jeff King
Message 10 of 16 in “commit a1f6baa5 (wrap long header lines) breaks my habit”
  1. Stefan-W. HahnMay 24, 2011
  2. Junio C HamanoMay 24, 2011
  3. Stefan-W. HahnMay 24, 2011
  4. Jeff KingMay 24, 2011
  5. Stefan-W. HahnMay 25, 2011
  6. Jeff KingMay 26, 2011
  7. 1/3 t: test subject handling in format-patch / am pipelineJeff King, May 26, 2011
  8. 2/3 mailinfo: always clean up rfc822 header foldingJeff King, May 26, 2011
  9. 3/3 format-patch: preserve subject newlines with -kJeff King, May 26, 2011
  10. Junio C HamanoMay 26, 2011
  11. Jeff KingMay 26, 2011
  12. Jeff KingMay 26, 2011
  13. 3/5 pretty: add pp_commit_easy function for simple callersJeff King, May 26, 2011
  14. Junio C HamanoMay 26, 2011
  15. 4/5 clean up calling conventions for pretty.c functionsJeff King, May 26, 2011
  16. 5/5 format-patch: preserve subject newlines with -kJeff King, May 26, 2011

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.