diff options
author | Thomas Rast <trast@student.ethz.ch> | 2009-02-19 22:26:32 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2009-02-21 20:26:10 -0800 |
commit | 2175c10d5ad2769936f5bf5bcca5ea32715a7307 (patch) | |
tree | f5fa34e6da9a7ff4798824c8d3ed3b28c1f7ac12 /builtin-log.c | |
parent | b079c50e03a812f5c8197b8f38e0a5fe6dd31321 (diff) | |
download | git-2175c10d5ad2769936f5bf5bcca5ea32715a7307.tar.gz git-2175c10d5ad2769936f5bf5bcca5ea32715a7307.tar.xz |
format-patch: thread as reply to cover letter even with in-reply-to
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@student.ethz.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'builtin-log.c')
-rw-r--r-- | builtin-log.c | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/builtin-log.c b/builtin-log.c index 59671139b..1df38e17a 100644 --- a/builtin-log.c +++ b/builtin-log.c @@ -1036,12 +1036,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_ids->nr > 0) + if (rev.ref_message_ids->nr > 0 + && (!cover_letter || rev.nr > 1)) free(rev.message_id); else string_list_append(rev.message_id, |