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 26, 2011, 20:36 UTC
Message-ID
<20110526203625.GA31018@sigill.intra.peff.net>
In-Reply-To
<20110525154046.GC7723@scotty.home>
On Wed, May 25, 2011 at 05:40:46PM +0200, Stefan-W. Hahn wrote:
Show 11 quoted lines
> > 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
> 
> Correct, I checked this, so with
> 
>    git format-patch -k --stdout a..b | git am -3
> (no second -k)
> 
> all is as before. 
> 
> Thanks for your clarification, sorry for the noise.

Actually, I don't think it's noise. Look at the documentation patch you suggest:

Show 10 quoted lines
> index d13c9b2..4e62248 100644
> --- a/Documentation/git-format-patch.txt
> +++ b/Documentation/git-format-patch.txt
> @@ -468,6 +468,16 @@ the current branch using 'git am' to cherry-pick them:
>  ------------
>  $ git format-patch -k --stdout R1..R2 | git am -3 -k
>  ------------
> ++
> +In this example the subject lines of the commits will be folded after
> +78 characters and 'git am' will keep this folding.

You are using "format-patch -k | am -k". Surely that should preserve your subject, no matter the length, and the fact that we need to document it is a sign that the behavior is simply wrong.

So I think we should do the following series instead.
  [1/3]: t: test subject handling in format-patch / am pipeline
  [2/3]: mailinfo: always clean up rfc822 header folding
  [3/3]: format-patch: preserve subject newlines with -k
-Peff
Previous: Stefan-W. HahnNext: Jeff King
Message 6 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.