Currently, format-patch --thread --cover-letter --in-reply-to $parent makes all mails, including the cover letter, a reply to $parent. However, we would want the reader to consider the cover letter above all the patches. This changes the semantics so that only the cover letter is a reply to $parent, while all the patches are formatted as replies to the cover letter. Signed-off-by: Thomas Rast <trast@xxxxxxxxxxxxxxx> --- Thomas Rast wrote: > Unrelated note regarding --thread usage: > > Wouldn't it be better if format-patch made it so that the cover > letter, if any, is the (only) reply to the --in-reply-to, and all > actual patches are replies to the cover letter? Maybe like this? builtin-log.c | 20 +++++++++++++++----- 1 files changed, 15 insertions(+), 5 deletions(-) diff --git a/builtin-log.c b/builtin-log.c index 2ae39af..ec11f95 100644 --- a/builtin-log.c +++ b/builtin-log.c @@ -1031,12 +1031,22 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix) /* Have we already had a message ID? */ if (rev.message_id) { /* - * If we've got the ID to be a reply - * to, discard the current ID; - * otherwise, make everything a reply - * to that. + * Without --cover-letter and + * --in-reply-to, make every mail a + * reply to the one before. + * + * With --in-reply-to but no + * --cover-letter, make every mail a + * reply to the <reply-to>. + * + * With --cover-letter, make every + * mail but the cover letter a reply + * to the cover letter. The cover + * letter is a reply to the + * --in-reply-to, if specified. */ - if (rev.ref_message_id) + if (rev.ref_message_id + && (!cover_letter || rev.nr > 1)) free(rev.message_id); else rev.ref_message_id = rev.message_id; -- 1.6.2.rc0.328.g2c702 -- To unsubscribe from this list: send the line "unsubscribe git" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html