{"thread":{"id":"4832","subject":"[PATCH] git-format-patch: Make the second and subsequent mails replies to the first","startedAt":"2006-07-10T15:44:25Z","lastAt":"2006-07-15T08:10:47Z","messageCount":13,"participants":["Josh Triplett","Johannes Schindelin","Erik Mouw","Jakub Narebski","Junio C Hamano","Petr Baudis"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"23552","messageId":"1152546266.8890.19.camel@josh-work.beaverton.ibm.com","threadId":"4832","inReplyTo":null,"subject":"[PATCH] git-format-patch: Make the second and subsequent mails replies to the first","fromName":"Josh Triplett","fromEmail":"josht@vnet.ibm.com","sentAt":"2006-07-10T15:44:25Z","receivedAt":"2006-07-10T15:44:25Z","isPatch":true,"sender":{"key":"josht@vnet.ibm.com","avatar":null},"body":"Add message_id and ref_message_id fields to struct rev_info, used in show_log\nwith CMIT_FMT_EMAIL to set Message-Id and In-Reply-To/References respectively.\nUse these in git-format-patch to make the second and subsequent patch mails\nreplies to the first patch mail.\n\nSigned-off-by: Josh Triplett <josh@freedesktop.org>\n---\ngit-send-email already does this, but this change helps people who use\nthings like git-imap-send or similar to send the patch emails by other\nmeans.\n\n builtin-log.c |   23 +++++++++++++++++++++++\n log-tree.c    |    5 +++++\n revision.h    |    2 ++\n 3 files changed, 30 insertions(+), 0 deletions(-)\n\ndiff --git a/builtin-log.c b/builtin-log.c\nindex 864c6cd..9d0cae1 100644\n--- a/builtin-log.c\n+++ b/builtin-log.c\n@@ -220,6 +220,17 @@ static void get_patch_ids(struct rev_inf\n \to2->flags = flags2;\n }\n \n+static void gen_message_id(char *dest, unsigned int length, char *base)\n+{\n+\tconst char *committer = git_committer_info(1);\n+\tconst char *email_start = strrchr(committer, '<');\n+\tconst char *email_end = strrchr(committer, '>');\n+\tif(!email_start || !email_end || email_start > email_end - 1)\n+\t\tdie(\"Could not extract email from committer identity.\");\n+\tsnprintf(dest, length, \"%s.%u.git.%.*s\", base, time(NULL),\n+\t\t email_end - email_start - 1, email_start + 1);\n+}\n+\n int cmd_format_patch(int argc, const char **argv, char **envp)\n {\n \tstruct commit *commit;\n@@ -233,6 +244,8 @@ int cmd_format_patch(int argc, const cha\n \tint ignore_if_in_upstream = 0;\n \tstruct diff_options patch_id_opts;\n \tchar *add_signoff = NULL;\n+\tchar message_id[1024];\n+\tchar ref_message_id[1024];\n \n \tinit_revisions(&rev);\n \trev.commit_format = CMIT_FMT_EMAIL;\n@@ -359,6 +372,16 @@ int cmd_format_patch(int argc, const cha\n \t\tint shown;\n \t\tcommit = list[nr];\n \t\trev.nr = total - nr + (start_number - 1);\n+\t\t/* Make the second and subsequent mails replies to the first */\n+\t\tif (nr == (total - 2)) {\n+\t\t\tstrncpy(ref_message_id, message_id,\n+\t\t\t\tsizeof(ref_message_id));\n+\t\t\tref_message_id[sizeof(ref_message_id)-1] = '\\0';\n+\t\t\trev.ref_message_id = ref_message_id;\n+\t\t}\n+\t\tgen_message_id(message_id, sizeof(message_id),\n+\t\t\t       sha1_to_hex(commit->object.sha1));\n+\t\trev.message_id = message_id;\n \t\tif (!use_stdout)\n \t\t\treopen_stdout(commit, rev.nr, keep_subject);\n \t\tshown = log_tree_commit(&rev, commit);\ndiff --git a/log-tree.c b/log-tree.c\nindex 9d8d46f..4971988 100644\n--- a/log-tree.c\n+++ b/log-tree.c\n@@ -97,6 +97,11 @@ void show_log(struct rev_info *opt, cons\n \t\t\tsubject = \"Subject: \";\n \n \t\tprintf(\"From %s Mon Sep 17 00:00:00 2001\\n\", sha1);\n+\t\tif (opt->message_id)\n+\t\t\tprintf(\"Message-Id: <%s>\\n\", opt->message_id);\n+\t\tif (opt->ref_message_id)\n+\t\t\tprintf(\"In-Reply-To: <%s>\\nReferences: <%s>\\n\",\n+\t\t\t       opt->ref_message_id, opt->ref_message_id);\n \t\tif (opt->mime_boundary) {\n \t\t\tstatic char subject_buffer[1024];\n \t\t\tstatic char buffer[1024];\ndiff --git a/revision.h b/revision.h\nindex c010a08..e23ec8f 100644\n--- a/revision.h\n+++ b/revision.h\n@@ -61,6 +61,8 @@ struct rev_info {\n \tstruct log_info *loginfo;\n \tint\t\tnr, total;\n \tconst char\t*mime_boundary;\n+\tconst char\t*message_id;\n+\tconst char\t*ref_message_id;\n \tconst char\t*add_signoff;\n \tconst char\t*extra_headers;\n \n-- \n1.4.1.gbe4c7-dirty\n"},{"id":"23553","messageId":"Pine.LNX.4.63.0607101801360.29667@wbgn013.biozentrum.uni-wuerzburg.de","threadId":"4832","inReplyTo":"1152546266.8890.19.camel@josh-work.beaverton.ibm.com","subject":"Re: [PATCH] git-format-patch: Make the second and subsequent mails replies to the first","fromName":"Johannes Schindelin","fromEmail":"johannes.schindelin@gmx.de","sentAt":"2006-07-10T16:01:48Z","receivedAt":"2006-07-10T16:01:48Z","isPatch":true,"sender":{"key":"johannes.schindelin@gmx.de","avatar":"https://avatars.githubusercontent.com/u/127790?v=4"},"body":"Hi,\n\nplease make that behaviour optional.\n\nCiao,\nDscho\n"},{"id":"23554","messageId":"20060710162920.GR20191@harddisk-recovery.com","threadId":"4832","inReplyTo":"Pine.LNX.4.63.0607101801360.29667@wbgn013.biozentrum.uni-wuerzburg.de","subject":"Re: [PATCH] git-format-patch: Make the second and subsequent mails replies to the first","fromName":"Erik Mouw","fromEmail":"erik@harddisk-recovery.com","sentAt":"2006-07-10T16:29:20Z","receivedAt":"2006-07-10T16:29:20Z","isPatch":true,"sender":{"key":"erik@harddisk-recovery.com","avatar":null},"body":"On Mon, Jul 10, 2006 at 06:01:48PM +0200, Johannes Schindelin wrote:\n> please make that behaviour optional.\n\nRather make it consistent with git-send-email. Principle of least\nsurprise.\n\n\nErik\n\n-- \n+-- Erik Mouw -- www.harddisk-recovery.com -- +31 70 370 12 90 --\n| Lab address: Delftechpark 26, 2628 XH, Delft, The Netherlands\n"},{"id":"23555","messageId":"1152549787.8890.36.camel@josh-work.beaverton.ibm.com","threadId":"4832","inReplyTo":"20060710162920.GR20191@harddisk-recovery.com","subject":"Re: [PATCH] git-format-patch: Make the second and subsequent mails replies to the first","fromName":"Josh Triplett","fromEmail":"josht@us.ibm.com","sentAt":"2006-07-10T16:43:06Z","receivedAt":"2006-07-10T16:43:06Z","isPatch":true,"sender":{"key":"josh@joshtriplett.org","avatar":"https://avatars.githubusercontent.com/u/162737?v=4"},"body":"On Mon, 2006-07-10 at 18:29 +0200, Erik Mouw wrote:\n> On Mon, Jul 10, 2006 at 06:01:48PM +0200, Johannes Schindelin wrote:\n> > please make that behaviour optional.\n> \n> Rather make it consistent with git-send-email. Principle of least\n> surprise.\n\nWell, git-send-email does not include an option to disable the threading\nheaders, so consistency with git-send-email would imply not including\nany such option.  I can, however, implement a --no-thread option to omit\nthe headers, as well as git-send-email's --in-reply-to option to set an\ninitial In-Reply-To/References.  New patch series shortly.\n\n- Josh Triplett\n"},{"id":"23560","messageId":"1152556878.8890.45.camel@josh-work.beaverton.ibm.com","threadId":"4832","inReplyTo":"20060710162920.GR20191@harddisk-recovery.com","subject":"[PATCH 1/3] git-format-patch: Make the second and subsequent mails replies to the first","fromName":"Josh Triplett","fromEmail":"josht@us.ibm.com","sentAt":"2006-07-10T18:41:18Z","receivedAt":"2006-07-10T18:41:18Z","isPatch":true,"sender":{"key":"josh@joshtriplett.org","avatar":"https://avatars.githubusercontent.com/u/162737?v=4"},"body":"Add message_id and ref_message_id fields to struct rev_info, used in show_log\nwith CMIT_FMT_EMAIL to set Message-Id and In-Reply-To/References respectively.\nUse these in git-format-patch to make the second and subsequent patch mails\nreplies to the first patch mail.\n\nSigned-off-by: Josh Triplett <josh@freedesktop.org>\n---\nResend of previous patch as part of new patch series.\n\n builtin-log.c |   23 +++++++++++++++++++++++\n log-tree.c    |    5 +++++\n revision.h    |    2 ++\n 3 files changed, 30 insertions(+), 0 deletions(-)\n\ndiff --git a/builtin-log.c b/builtin-log.c\nindex 864c6cd..9d0cae1 100644\n--- a/builtin-log.c\n+++ b/builtin-log.c\n@@ -220,6 +220,17 @@ static void get_patch_ids(struct rev_inf\n \to2->flags = flags2;\n }\n \n+static void gen_message_id(char *dest, unsigned int length, char *base)\n+{\n+\tconst char *committer = git_committer_info(1);\n+\tconst char *email_start = strrchr(committer, '<');\n+\tconst char *email_end = strrchr(committer, '>');\n+\tif(!email_start || !email_end || email_start > email_end - 1)\n+\t\tdie(\"Could not extract email from committer identity.\");\n+\tsnprintf(dest, length, \"%s.%u.git.%.*s\", base, time(NULL),\n+\t\t email_end - email_start - 1, email_start + 1);\n+}\n+\n int cmd_format_patch(int argc, const char **argv, char **envp)\n {\n \tstruct commit *commit;\n@@ -233,6 +244,8 @@ int cmd_format_patch(int argc, const cha\n \tint ignore_if_in_upstream = 0;\n \tstruct diff_options patch_id_opts;\n \tchar *add_signoff = NULL;\n+\tchar message_id[1024];\n+\tchar ref_message_id[1024];\n \n \tinit_revisions(&rev);\n \trev.commit_format = CMIT_FMT_EMAIL;\n@@ -359,6 +372,16 @@ int cmd_format_patch(int argc, const cha\n \t\tint shown;\n \t\tcommit = list[nr];\n \t\trev.nr = total - nr + (start_number - 1);\n+\t\t/* Make the second and subsequent mails replies to the first */\n+\t\tif (nr == (total - 2)) {\n+\t\t\tstrncpy(ref_message_id, message_id,\n+\t\t\t\tsizeof(ref_message_id));\n+\t\t\tref_message_id[sizeof(ref_message_id)-1] = '\\0';\n+\t\t\trev.ref_message_id = ref_message_id;\n+\t\t}\n+\t\tgen_message_id(message_id, sizeof(message_id),\n+\t\t\t       sha1_to_hex(commit->object.sha1));\n+\t\trev.message_id = message_id;\n \t\tif (!use_stdout)\n \t\t\treopen_stdout(commit, rev.nr, keep_subject);\n \t\tshown = log_tree_commit(&rev, commit);\ndiff --git a/log-tree.c b/log-tree.c\nindex 9d8d46f..4971988 100644\n--- a/log-tree.c\n+++ b/log-tree.c\n@@ -97,6 +97,11 @@ void show_log(struct rev_info *opt, cons\n \t\t\tsubject = \"Subject: \";\n \n \t\tprintf(\"From %s Mon Sep 17 00:00:00 2001\\n\", sha1);\n+\t\tif (opt->message_id)\n+\t\t\tprintf(\"Message-Id: <%s>\\n\", opt->message_id);\n+\t\tif (opt->ref_message_id)\n+\t\t\tprintf(\"In-Reply-To: <%s>\\nReferences: <%s>\\n\",\n+\t\t\t       opt->ref_message_id, opt->ref_message_id);\n \t\tif (opt->mime_boundary) {\n \t\t\tstatic char subject_buffer[1024];\n \t\t\tstatic char buffer[1024];\ndiff --git a/revision.h b/revision.h\nindex c010a08..e23ec8f 100644\n--- a/revision.h\n+++ b/revision.h\n@@ -61,6 +61,8 @@ struct rev_info {\n \tstruct log_info *loginfo;\n \tint\t\tnr, total;\n \tconst char\t*mime_boundary;\n+\tconst char\t*message_id;\n+\tconst char\t*ref_message_id;\n \tconst char\t*add_signoff;\n \tconst char\t*extra_headers;\n \n-- \n1.4.1.gf029\n"},{"id":"23576","messageId":"e8ud22$jo1$1@sea.gmane.org","threadId":"4832","inReplyTo":"1152549787.8890.36.camel@josh-work.beaverton.ibm.com","subject":"Re: [PATCH] git-format-patch: Make the second and subsequent mails replies to the first","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2006-07-10T20:25:08Z","receivedAt":"2006-07-10T20:25:08Z","isPatch":true,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Josh Triplett wrote:\n\n> On Mon, 2006-07-10 at 18:29 +0200, Erik Mouw wrote:\n>> On Mon, Jul 10, 2006 at 06:01:48PM +0200, Johannes Schindelin wrote:\n>> > please make that behaviour optional.\n>> \n>> Rather make it consistent with git-send-email. Principle of least\n>> surprise.\n> \n> Well, git-send-email does not include an option to disable the threading\n> headers, so consistency with git-send-email would imply not including\n> any such option.  I can, however, implement a --no-thread option to omit\n> the headers, as well as git-send-email's --in-reply-to option to set an\n> initial In-Reply-To/References.  New patch series shortly.\n\ngit-send-email has three ways of sending files:\n 1. Chain Reply-To:, where every patch refers to earlier in series.\n    Ugly in threaded mail/news readers, harder to comment, but there is\n    no way to loose the order (e.g. if patches are not numbered *blush*)\n 2. No chain reply-to, with cover letter introducing patch series.\n    IMHO nicest format... provided there are no errors nor mistakes.\n 3. No chain reply-to, without cover letter. I presonally don't like \n    this format, YMMV.\n-- \nJakub Narebski\nWarsaw, Poland\nShadeHawk on #git\n"},{"id":"23586","messageId":"7vwtal9lu1.fsf@assigned-by-dhcp.cox.net","threadId":"4832","inReplyTo":"1152556878.8890.45.camel@josh-work.beaverton.ibm.com","subject":"Re: [PATCH 1/3] git-format-patch: Make the second and subsequent mails replies to the first","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-07-10T21:44:22Z","receivedAt":"2006-07-10T21:44:22Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Josh Triplett <josht@us.ibm.com> writes:\n\n> Add message_id and ref_message_id fields to struct rev_info, used in show_log\n> with CMIT_FMT_EMAIL to set Message-Id and In-Reply-To/References respectively.\n> Use these in git-format-patch to make the second and subsequent patch mails\n> replies to the first patch mail.\n>\n> Signed-off-by: Josh Triplett <josh@freedesktop.org>\n> ---\n> Resend of previous patch as part of new patch series.\n\nWhile I understand what you said about imap-send, I really would\nfeel better if this was optional.  Do not change the default\noutput format, please.\n"},{"id":"23826","messageId":"1152897407.5177.8.camel@josh-work.beaverton.ibm.com","threadId":"4832","inReplyTo":"7vwtal9lu1.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH 1/3] git-format-patch: Make the second and subsequent mails replies to the first","fromName":"Josh Triplett","fromEmail":"josht@us.ibm.com","sentAt":"2006-07-14T17:16:47Z","receivedAt":"2006-07-14T17:16:47Z","isPatch":true,"sender":{"key":"josh@joshtriplett.org","avatar":"https://avatars.githubusercontent.com/u/162737?v=4"},"body":"On Mon, 2006-07-10 at 14:44 -0700, Junio C Hamano wrote:\n> Josh Triplett <josht@us.ibm.com> writes:\n> \n> > Add message_id and ref_message_id fields to struct rev_info, used in show_log\n> > with CMIT_FMT_EMAIL to set Message-Id and In-Reply-To/References respectively.\n> > Use these in git-format-patch to make the second and subsequent patch mails\n> > replies to the first patch mail.\n> >\n> > Signed-off-by: Josh Triplett <josh@freedesktop.org>\n> > ---\n> > Resend of previous patch as part of new patch series.\n> \n> While I understand what you said about imap-send, I really would\n> feel better if this was optional.  Do not change the default\n> output format, please.\n\nSo rather than the --no-thread option provided in the second patch of\nthis series, you'd prefer a --thread option to enable setting the\nIn-Reply-To/References headers?\n\nNote that I based the direction of the --no-thread switch on\ngit-send-email's inclusion of these headers by default with no way to\nturn them off, figuring that having an option to do so gave it an\nadvantage over git-send-email while remaining consistent with it.  I\nalso figured that most people would not mess with the defaults, and thus\nthe default should make a patch series more readable on mailing lists.\n\n- Josh Triplett\n"},{"id":"23834","messageId":"7v4pxkoxjp.fsf@assigned-by-dhcp.cox.net","threadId":"4832","inReplyTo":"1152897407.5177.8.camel@josh-work.beaverton.ibm.com","subject":"Re: [PATCH 1/3] git-format-patch: Make the second and subsequent mails replies to the first","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-07-14T18:23:38Z","receivedAt":"2006-07-14T18:23:38Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Josh Triplett <josht@us.ibm.com> writes:\n\n>> While I understand what you said about imap-send, I really would\n>> feel better if this was optional.  Do not change the default\n>> output format, please.\n>\n> So rather than the --no-thread option provided in the second patch of\n> this series, you'd prefer a --thread option to enable setting the\n> In-Reply-To/References headers?\n\nEh, that's not what I meant.\n\nI do not mind the code you added to log-tree.c and revision.h,\nand honestly I do not care which of threading or non-threading\nmode is the default, although I think your explanation that it\nparallels what send-email does makes a lot of sense.\n\nBut I do mind that the code added by the first patch to\ncmd_format_patch runs by default, and worse yet, there is no\noption turn it off.  Setting message_id and ref_message_id in\nrev_info struct should be something the end user should ask for\nexplicitly by invoking the command with an option, perhaps\n--with-message-id, which you probably would also want to turn on\nwhen any of --no-thread, --thread or --initial-reply-to options\nare given.\n-\n"},{"id":"23836","messageId":"1152904829.5177.19.camel@josh-work.beaverton.ibm.com","threadId":"4832","inReplyTo":"7v4pxkoxjp.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH 1/3] git-format-patch: Make the second and subsequent mails replies to the first","fromName":"Josh Triplett","fromEmail":"josht@us.ibm.com","sentAt":"2006-07-14T19:20:28Z","receivedAt":"2006-07-14T19:20:28Z","isPatch":true,"sender":{"key":"josh@joshtriplett.org","avatar":"https://avatars.githubusercontent.com/u/162737?v=4"},"body":"On Fri, 2006-07-14 at 11:23 -0700, Junio C Hamano wrote:\n> Josh Triplett <josht@us.ibm.com> writes:\n> \n> >> While I understand what you said about imap-send, I really would\n> >> feel better if this was optional.  Do not change the default\n> >> output format, please.\n> >\n> > So rather than the --no-thread option provided in the second patch of\n> > this series, you'd prefer a --thread option to enable setting the\n> > In-Reply-To/References headers?\n> \n> Eh, that's not what I meant.\n> \n> I do not mind the code you added to log-tree.c and revision.h,\n> and honestly I do not care which of threading or non-threading\n> mode is the default, although I think your explanation that it\n> parallels what send-email does makes a lot of sense.\n> \n> But I do mind that the code added by the first patch to\n> cmd_format_patch runs by default, and worse yet, there is no\n> option turn it off.  Setting message_id and ref_message_id in\n> rev_info struct should be something the end user should ask for\n> explicitly by invoking the command with an option, perhaps\n> --with-message-id, which you probably would also want to turn on\n> when any of --no-thread, --thread or --initial-reply-to options\n> are given.\n\nHow would that work though?  Threading requires a Message-Id on at least\nthe first message, so to avoid Message-IDs by default would require\nturning off threading by default; I can do that if you like, but you\nsuggested that you didn't mind having threading as the default.  I\ncould, however, avoid generating Message-Id on the subsequent messages,\nand avoid generating that Message-Id if you give --no-thread.  Would\nthat work?\n\n- Josh Triplett\n"},{"id":"23837","messageId":"7vwtagnfsk.fsf@assigned-by-dhcp.cox.net","threadId":"4832","inReplyTo":"1152904829.5177.19.camel@josh-work.beaverton.ibm.com","subject":"Re: [PATCH 1/3] git-format-patch: Make the second and subsequent mails replies to the first","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-07-14T19:32:27Z","receivedAt":"2006-07-14T19:32:27Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Josh Triplett <josht@us.ibm.com> writes:\n\n> ..., but you\n> suggested that you didn't mind having threading as the default.\n\nDid I? ... then that was either a mistake or miscommunication.\n\nI do mind changing the default output.  I do not mind threading\nas the default ONLY IF user asks for output with these extra\nheaders.\n"},{"id":"23854","messageId":"20060715074532.GF13776@pasky.or.cz","threadId":"4832","inReplyTo":"7vwtagnfsk.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH 1/3] git-format-patch: Make the second and subsequent mails replies to the first","fromName":"Petr Baudis","fromEmail":"pasky@suse.cz","sentAt":"2006-07-15T07:45:32Z","receivedAt":"2006-07-15T07:45:32Z","isPatch":true,"sender":{"key":"pasky@ucw.cz","avatar":"https://avatars.githubusercontent.com/u/18439?v=4"},"body":"Dear diary, on Fri, Jul 14, 2006 at 09:32:27PM CEST, I got a letter\nwhere Junio C Hamano <junkio@cox.net> said that...\n> Josh Triplett <josht@us.ibm.com> writes:\n> \n> > ..., but you\n> > suggested that you didn't mind having threading as the default.\n> \n> Did I? ... then that was either a mistake or miscommunication.\n> \n> I do mind changing the default output.  I do not mind threading\n> as the default ONLY IF user asks for output with these extra\n> headers.\n\nWhat's the big deal? It's not like we didn't change those things in the\npast if it doesn't horribly break everything and the new behaviour is\nclearly more sensible.\n\nIt would be good to know what the general policy on this is nowadays.\n\n-- \n\t\t\t\tPetr \"Pasky\" Baudis\nStuff: http://pasky.or.cz/\nSnow falling on Perl. White noise covering line noise.\nHides all the bugs too. -- J. Putnam\n"},{"id":"23855","messageId":"7virlzmgoo.fsf@assigned-by-dhcp.cox.net","threadId":"4832","inReplyTo":"20060715074532.GF13776@pasky.or.cz","subject":"Re: [PATCH 1/3] git-format-patch: Make the second and subsequent mails replies to the first","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-07-15T08:10:47Z","receivedAt":"2006-07-15T08:10:47Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Petr Baudis <pasky@suse.cz> writes:\n\n> Dear diary, on Fri, Jul 14, 2006 at 09:32:27PM CEST, I got a letter\n> where Junio C Hamano <junkio@cox.net> said that...\n>> Josh Triplett <josht@us.ibm.com> writes:\n>> \n>> > ..., but you\n>> > suggested that you didn't mind having threading as the default.\n>> \n>> Did I? ... then that was either a mistake or miscommunication.\n>> \n>> I do mind changing the default output.  I do not mind threading\n>> as the default ONLY IF user asks for output with these extra\n>> headers.\n>\n> What's the big deal? It's not like we didn't change those things in the\n> past if it doesn't horribly break everything and the new behaviour is\n> clearly more sensible.\n\nWhile I agree to the whole three lines, I do not think adding the\nMessage-Id and In-Reply-To header lines by default is more\nsensible at all.\n\nAdding phoney Message-Id to format-patch output makes some sense\nonly when you are sending messages, and if I recall original\n\"motive\" message correctly only with git-imap-send.  We do not\nneed this for git-send-email, since it can do its own threading.\n\nAlthough I've already accepted the series to \"next\", now after\nyou brought up the issue, I started to suspect that it might\neven make sense not to do this in format-patch but make it a\nresponsibility for MUA-looking commands instead.\n\nMore importantly, format-patch is used to extract patches into\nseparate files (I do that myself often, and I think Andrew\nMorten uses it to extract stuff from git-maintained trees).  In\nsuch a case having phoney Message-Id is simply a waste.  Running\n\"head -n X 0*.txt\" now needs one or two larger X to view the\nsame information, and fewer patches fit on the screen than\nbefore.  So the new behaviour, if it were not optional, is\nclearly less useful for such purpose.\n\nIt could even be confusing and inviting mistakes.  When quoting\na change from somebody that was sent in an e-mail to the list,\ngiving its Message-Id is often helpful to others who want to go\nto the source themselves, but if a file that was generated by\nformat-patch by default carries a phoney Message-Id, it can be\nmistakenly used in such a quote.\n"}]}