{"thread":{"id":"4967","subject":"[PATCH] support cover letter before commit log, using \"+++\"","startedAt":"2006-07-23T21:45:25Z","lastAt":"2006-07-24T09:53:56Z","messageCount":4,"participants":["Martin Waitz","Junio C Hamano","Jakub Narebski"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"24029","messageId":"20060723214524.GC20068@admingilde.org","threadId":"4967","inReplyTo":null,"subject":"[PATCH] support cover letter before commit log, using \"+++\"","fromName":"Martin Waitz","fromEmail":"tali@admingilde.org","sentAt":"2006-07-23T21:45:25Z","receivedAt":"2006-07-23T21:45:25Z","isPatch":true,"sender":{"key":"tali@admingilde.org","avatar":"https://gravatar.com/avatar/3f89b03eee362187effabe257898735b475673a12265c398ea9161259ae91553?d=mp&s=160"},"body":"We already have a \"---\" separator to end the commit log.\nBut writing the cover letter after this separator looks strange.\nNow it is possible to put the cover letter and comments both before\nor after the commit log, as the author sees fit.\n\nJust put the commit log between lines starting with \"+++\" and \"---\".\n\nSigned-off-by: Martin Waitz <tali@admingilde.org>\n---\n builtin-mailinfo.c |    7 +++++++\n 1 files changed, 7 insertions(+), 0 deletions(-)\n\ndiff --git a/builtin-mailinfo.c b/builtin-mailinfo.c\nindex ac53f76..a1cfc81 100644\n--- a/builtin-mailinfo.c\n+++ b/builtin-mailinfo.c\n@@ -690,6 +690,13 @@ static int handle_commit_msg(int *seen)\n \t\t\treturn 1;\n \t\t}\n \n+\t\t/* check for separator between cover-letter and commit log */\n+\t\tif (!memcmp(\"+++\", line, 3)) {\n+\t\t\trewind(cmitmsg);\n+\t\t\tftruncate(fileno(cmitmsg), 0);\n+\t\t\tcontinue;\n+\t\t}\n+\n \t\t/* Unwrap transfer encoding and optionally\n \t\t * normalize the log message to UTF-8.\n \t\t */\n-- \n1.4.1.gd3582\n\n-- \nMartin Waitz\n"},{"id":"24048","messageId":"7v1wsbfq75.fsf@assigned-by-dhcp.cox.net","threadId":"4967","inReplyTo":"20060723214524.GC20068@admingilde.org","subject":"Re: [PATCH] support cover letter before commit log, using \"+++\"","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-07-24T06:54:22Z","receivedAt":"2006-07-24T06:54:22Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Martin Waitz <tali@admingilde.org> writes:\n\n> We already have a \"---\" separator to end the commit log.\n> But writing the cover letter after this separator looks strange.\n> Now it is possible to put the cover letter and comments both before\n> or after the commit log, as the author sees fit.\n>\n> Just put the commit log between lines starting with \"+++\" and \"---\".\n>\n> Signed-off-by: Martin Waitz <tali@admingilde.org>\n\nI do not have problem with the implementation itself, but\n\n* I always had an impression that cover letters are tolerated\n  not encouraged.  In other words, as a good practice it would\n  be nice if necessary information is described in the commit\n  log messages themselves.  Do we want to start encouraging the\n  cover letter with this patch?\n\n* Has anybody ever used that \"+++\" as an auxiliary separator?\n  In other words, is it an established convention?  If not,\n  would it be a good convention that we would want to establish\n  here?\n"},{"id":"24049","messageId":"20060724070438.GD20068@admingilde.org","threadId":"4967","inReplyTo":"7v1wsbfq75.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH] support cover letter before commit log, using \"+++\"","fromName":"Martin Waitz","fromEmail":"tali@admingilde.org","sentAt":"2006-07-24T07:04:38Z","receivedAt":"2006-07-24T07:04:38Z","isPatch":true,"sender":{"key":"tali@admingilde.org","avatar":"https://gravatar.com/avatar/3f89b03eee362187effabe257898735b475673a12265c398ea9161259ae91553?d=mp&s=160"},"body":"hoi :)\n\nOn Sun, Jul 23, 2006 at 11:54:22PM -0700, Junio C Hamano wrote:\n> Martin Waitz <tali@admingilde.org> writes:\n> \n> > We already have a \"---\" separator to end the commit log.\n> > But writing the cover letter after this separator looks strange.\n> > Now it is possible to put the cover letter and comments both before\n> > or after the commit log, as the author sees fit.\n> >\n> > Just put the commit log between lines starting with \"+++\" and \"---\".\n> >\n> > Signed-off-by: Martin Waitz <tali@admingilde.org>\n> \n> I do not have problem with the implementation itself, but\n> \n> * I always had an impression that cover letters are tolerated\n>   not encouraged.  In other words, as a good practice it would\n>   be nice if necessary information is described in the commit\n>   log messages themselves.  Do we want to start encouraging the\n>   cover letter with this patch?\n\nthat's right, but:\n\n * before using automatic tools to generate mails from patches people\n   started their mails with \"hello\" or something similiar.\n   As these lines are frowned upon in the changelog people just stop\n   being polite.\n\n * I have often seen patches evolving in an email thread.\n   With such an separator it is possible to keep the thread history\n   in one part and a clean change message in another part.\n\nI don't really know if this +++ thing will be used much. It's just\nsomething that I thought might be missing and it was easy to do ;-)\n\n> * Has anybody ever used that \"+++\" as an auxiliary separator?\n>   In other words, is it an established convention?  If not,\n>   would it be a good convention that we would want to establish\n>   here?\n\nI haven't seen the \"+++\" before here. People have used their own\n\"cut here\" markers somethimes but I don't think their is an\nestablished convention already.\nThe \"+++\" just felt good in combination with the \"---\" end marker.\n\n-- \nMartin Waitz\n"},{"id":"24056","messageId":"ea25am$1qa$1@sea.gmane.org","threadId":"4967","inReplyTo":"20060724070438.GD20068@admingilde.org","subject":"Re: [PATCH] support cover letter before commit log, using \"+++\"","fromName":"Jakub Narebski","fromEmail":"jnareb@gmail.com","sentAt":"2006-07-24T09:53:56Z","receivedAt":"2006-07-24T09:53:56Z","isPatch":true,"sender":{"key":"jnareb@gmail.com","avatar":"https://avatars.githubusercontent.com/u/2706?v=4"},"body":"Martin Waitz wrote:\n\n> I haven't seen the \"+++\" before here. People have used their own\n> \"cut here\" markers somethimes but I don't think their is an\n> established convention already.\n\nMost common I think is the variation of \"scissors\" separator, i.e.\n\n-- >8 --\n\n> The \"+++\" just felt good in combination with the \"---\" end marker.\n\nTrue.\n\n-- \nJakub Narebski\nWarsaw, Poland\nShadeHawk on #git\n"}]}