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

Re: commit a1f6baa5 (wrap long header lines) breaks my habit

From
Jeff King <peff@peff.net>
Date
May 24, 2011, 20:07 UTC
Message-ID
<20110524200716.GF584@sigill.intra.peff.net>
In-Reply-To
<20110524164616.GB7723@scotty.home>
On Tue, May 24, 2011 at 06:46:16PM +0200, Stefan-W. Hahn wrote:
Show 8 quoted lines
> Mail von Junio C Hamano, Tue, 24 May 2011 at 09:27:46 -0700:
> 
> > >    git format-patch -k --stdout a..b | git am -k -3
> > 
> > Why -k to am?
> 
> Just first "-k", and "git am -3". Wrong in mind here at home before my
> computer.

Then it should preserve your long subject line just fine, as mailsplit (called by "am") will reassemble the folded line according to rfc822 header folding rules.

With "am -k", it does keep the fold. This is an artifact of the original behavior, where the folds were literally included from a multi-line subject. We should probably stop doing that now that we fold on length (and should probably embed newlines via rfc2047 encoding in format-patch, at least with "-k", so that you can losslessly move multi-line subjects between the two if you always use "-k").

-Peff
Previous: Stefan-W. HahnNext: Stefan-W. Hahn
Message 4 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.