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

Re: [PATCH 2/2] Improve doc for format-patch threading options.

From
Yann Dirson <ydirson@altern.org>
Date
Jul 16, 2009, 22:23 UTC
Message-ID
<20090716222356.GD5762@nan92-1-81-57-214-146.fbx.proxad.net>
In-Reply-To
<200907061049.30084.markus.heidelberg@web.de>
On Mon, Jul 06, 2009 at 10:49:29AM +0200, Markus Heidelberg wrote:
Show 29 quoted lines
> Yann Dirson, 06.07.2009:
> > +++ b/Documentation/git-format-patch.txt
> > @@ -132,9 +133,15 @@ The optional <style> argument can be either `shallow` or `deep`.
> >  'shallow' threading makes every mail a reply to the head of the
> >  series, where the head is chosen from the cover letter, the
> >  `\--in-reply-to`, and the first patch mail, in this order.  'deep'
> > -threading makes every mail a reply to the previous one.  If not
> > -specified, defaults to the 'format.thread' configuration, or `shallow`
> > -if that is not set.
> > +threading makes every mail a reply to the previous one.
> > ++
> > +The default is --no-thread, unless the 'format.thread' configuration
> > +is set.  If --thread is specified without a style, it defaults to the
> > +style specified by 'format.thread' if any, or else `shallow`.
> > ++
> > +Beware that the default for 'git send-email' is to do deep threading
> > +if the emails to be sent have no Message-Id header, which is what
> > +happens when then are generated by 'git format-patch --no-thread'.
> 
> Oh, due to the typo I mentioned in my previous mail, I forgot to really
> comment.
> 
> The last paragraph is misleading. git-send-email always adds headers for
> deep threading by default, regardless of any existing Message-Id
> headers.
> The current wording makes one believe, git-send-email respects existing
> headers if the patches are created with 'git format-patch --thread'.
> But that it isn't aware of them is exactly what you want to explain
> here.

Indeed I realize that I did not grasp correctly how things are supposed to fit together. Reading the code and experimenting, I see that:

- as you say, send-email completely ignores any pre-existing
In-Reply-To and References header (it does keep the Message-Id's,
though)
- send-email simply adds its own In-Reply-To and References headers.
That IMHO does not make any sense, and the behaviour of such a thing
is likely to vary among MUAs (if it even does not violate the
standards, which I did not check)
- even when --no-thread is specified, and format-patch was run with
--no-thread as well, it still adds In-Reply-To and References headers,
and I must say I do not see what in the code causes this behaviour.

Looks like we should clarify things first, and possibly fix things, before we can start to document them - or did I miss some point that would seem obvious to others ?

Previous: Markus HeidelbergNext: Markus Heidelberg
Message 6 of 17 in “format-patch / send-mail thrading documentation”
  1. 0/2 format-patch / send-mail thrading documentationYann Dirson, Jul 5, 2009
  2. 1/2 List send-email config options in config.txt.Yann Dirson, Jul 5, 2009
  3. 2/2 Improve doc for format-patch threading options.Yann Dirson, Jul 5, 2009
  4. Markus HeidelbergJul 6, 2009
  5. Markus HeidelbergJul 6, 2009
  6. Yann DirsonJul 16, 2009
  7. Markus HeidelbergJul 16, 2009
  8. Yann DirsonJul 17, 2009
  9. Markus HeidelbergJul 17, 2009
  10. Yann DirsonJul 22, 2009
  11. Junio C HamanoJul 6, 2009
  12. Yann DirsonJul 16, 2009
  13. 0/2 format-patch / send-mail threading documentationYann Dirson, Jul 22, 2009
  14. 1/2 List send-email config options in config.txt.Yann Dirson, Jul 22, 2009
  15. 2/2 Improve doc for format-patch threading options.Yann Dirson, Jul 22, 2009
  16. Markus HeidelbergJul 23, 2009
  17. Junio C HamanoJul 22, 2009

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.