{"thread":{"id":"536","subject":"Commit template","startedAt":"2005-05-08T19:07:36Z","lastAt":"2005-05-08T21:09:16Z","messageCount":11,"participants":["Sean","Marcel Holtmann","Petr Baudis"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"2796","messageId":"1965.10.10.10.24.1115579256.squirrel@linux1","threadId":"536","inReplyTo":null,"subject":"Commit template","fromName":"Sean","fromEmail":"seanlkml@sympatico.ca","sentAt":"2005-05-08T19:07:36Z","receivedAt":"2005-05-08T19:07:36Z","isPatch":false,"sender":{"key":"seanlkml@sympatico.ca","avatar":"https://gravatar.com/avatar/f92923f54fc08c401fc59b71829d4b89e9b8087fbba45ff87c82e6a83aee02ae?d=mp&s=160"},"body":"Hi Petr,\n\nThis adds the ability to have a per repository commit template.  Create a\n.git/commit.form file containg  \"CG: \" and other lines and it will be used\nin place of the regular top 3 lines.  This is kind of handy so that you\ncan include your signed-off-by: with your email etc.\n\n cg-commit |   11 ++++++++---\n 1 files changed, 8 insertions(+), 3 deletions(-)\n\nSean\n\nP.s. Can't inline patches with this mailer.\n\n\ncg-commit: needs update\nIndex: cg-commit\n===================================================================\n--- b2ce852fd77209e112e0b53866ca7004e9b0879f/cg-commit  (mode:100755)\n+++ uncommitted/cg-commit  (mode:100755)\n@@ -67,9 +67,14 @@\n \n LOGMSG=$(mktemp -t gitci.XXXXXX)\n LOGMSG2=$(mktemp -t gitci2.XXXXXX)\n-echo CG: ---------------------------------------------------------- >>$LOGMSG\n-echo CG: Lines beggining with CG: will be automatically removed     >>$LOGMSG\n-echo CG:                                                            >>$LOGMSG\n+if [ -e .git/commit.form ]; then\n+\tcat .git/commit.form >>$LOGMSG\n+else\n+\t{\n+\techo \"CG: ----------------------------------------------------------\"\n+\techo \"CG: Lines beggining with CG: will be automatically removed\"\n+\techo \"CG:\"; } >>$LOGMSG\n+fi\n if [ ! \"$ignorecache\" ]; then\n \tif [ ! \"${commitfiles[*]}\" ]; then\n \t\techo 'Nothing to commit.' >&2\n"},{"id":"2797","messageId":"1115579764.8949.15.camel@pegasus","threadId":"536","inReplyTo":"1965.10.10.10.24.1115579256.squirrel@linux1","subject":"Re: Commit template","fromName":"Marcel Holtmann","fromEmail":"marcel@holtmann.org","sentAt":"2005-05-08T19:16:04Z","receivedAt":"2005-05-08T19:16:04Z","isPatch":false,"sender":{"key":"marcel@holtmann.org","avatar":null},"body":"Hi Sean,\n\n> This adds the ability to have a per repository commit template.  Create a\n> .git/commit.form file containg  \"CG: \" and other lines and it will be used\n> in place of the regular top 3 lines.  This is kind of handy so that you\n> can include your signed-off-by: with your email etc.\n\nI think it is a bad idea to take the CG: into it. Let them be created by\nthe cg-commit script, because it knows what to do.\n\nThe question now is when we should provide that form. For me it only\nmakes sense if it is not a merge and if no commit message is provided\nvia command line.\n\nRegards\n\nMarcel\n\n\n"},{"id":"2799","messageId":"2003.10.10.10.24.1115580031.squirrel@linux1","threadId":"536","inReplyTo":"1115579764.8949.15.camel@pegasus","subject":"Re: Commit template","fromName":"Sean","fromEmail":"seanlkml@sympatico.ca","sentAt":"2005-05-08T19:20:31Z","receivedAt":"2005-05-08T19:20:31Z","isPatch":false,"sender":{"key":"seanlkml@sympatico.ca","avatar":"https://gravatar.com/avatar/f92923f54fc08c401fc59b71829d4b89e9b8087fbba45ff87c82e6a83aee02ae?d=mp&s=160"},"body":"On Sun, May 8, 2005 3:16 pm, Marcel Holtmann said:\n> Hi Sean,\n>\n>> This adds the ability to have a per repository commit template.  Create\n>> a\n>> .git/commit.form file containg  \"CG: \" and other lines and it will be\n>> used\n>> in place of the regular top 3 lines.  This is kind of handy so that you\n>> can include your signed-off-by: with your email etc.\n>\n> I think it is a bad idea to take the CG: into it. Let them be created by\n> the cg-commit script, because it knows what to do.\n>\n> The question now is when we should provide that form. For me it only\n> makes sense if it is not a merge and if no commit message is provided\n> via command line.\n\n\nMarcel,\n\nYeah, it was just a quick hack.  You're not forced to put any CG: lines in\nthe commit template of course, but it will handle it if you do.   Even\nwith the patch, cg-commit will add addtional CG: lines containing a list\nof modified files etc..\n\nSean\n\n\n"},{"id":"2802","messageId":"1115580630.8949.27.camel@pegasus","threadId":"536","inReplyTo":"2003.10.10.10.24.1115580031.squirrel@linux1","subject":"Re: Commit template","fromName":"Marcel Holtmann","fromEmail":"marcel@holtmann.org","sentAt":"2005-05-08T19:30:30Z","receivedAt":"2005-05-08T19:30:30Z","isPatch":false,"sender":{"key":"marcel@holtmann.org","avatar":null},"body":"Hi Sean,\n\n> >> This adds the ability to have a per repository commit template.  Create\n> >> a\n> >> .git/commit.form file containg  \"CG: \" and other lines and it will be\n> >> used\n> >> in place of the regular top 3 lines.  This is kind of handy so that you\n> >> can include your signed-off-by: with your email etc.\n> >\n> > I think it is a bad idea to take the CG: into it. Let them be created by\n> > the cg-commit script, because it knows what to do.\n> >\n> > The question now is when we should provide that form. For me it only\n> > makes sense if it is not a merge and if no commit message is provided\n> > via command line.\n>\n> Yeah, it was just a quick hack.  You're not forced to put any CG: lines in\n> the commit template of course, but it will handle it if you do.   Even\n> with the patch, cg-commit will add addtional CG: lines containing a list\n> of modified files etc..\n\nif you don't put any CG: lines in the commit template you screw up the\nlook of the modified files list. So I propose to leave all the CG: lines\nadditions as they are in cg-commit and only add the template in front of\nit.\n\nRegards\n\nMarcel\n\n\n"},{"id":"2813","messageId":"2095.10.10.10.24.1115582244.squirrel@linux1","threadId":"536","inReplyTo":"1115580630.8949.27.camel@pegasus","subject":"Re: Commit template","fromName":"Sean","fromEmail":"seanlkml@sympatico.ca","sentAt":"2005-05-08T19:57:24Z","receivedAt":"2005-05-08T19:57:24Z","isPatch":false,"sender":{"key":"seanlkml@sympatico.ca","avatar":"https://gravatar.com/avatar/f92923f54fc08c401fc59b71829d4b89e9b8087fbba45ff87c82e6a83aee02ae?d=mp&s=160"},"body":"On Sun, May 8, 2005 3:30 pm, Marcel Holtmann said:\n\nHey Marcel,\n\n> if you don't put any CG: lines in the commit template you screw up the\n> look of the modified files list. So I propose to leave all the CG: lines\n> additions as they are in cg-commit and only add the template in front of\n> it.\n\nYes, but you're free to make it look however you like.  Here's a sample:\n\nCG: -[DO NOT COMMIT!]-------------------------------------------\nCG:\nCG: Hey! You don't want to commit here, use a cloned repository!\nCG:\n\n\nand another:\n\nCG: -[USB CHANGES REPO!]----------------------------------------\nCG:\nCG: Commit only USB changes here!\nCG:\n\nSigned-off-by: Sean Estabrooks <seanlkml@sympatico.ca>\nCG:\nCG:\n\nThe trailing CG: lines ensure that those added by cg-commit look okay.\nIt's not perfect, but it's a nice feature.\n\nSean\n\n\n"},{"id":"2811","messageId":"1115582601.8949.31.camel@pegasus","threadId":"536","inReplyTo":"2095.10.10.10.24.1115582244.squirrel@linux1","subject":"Re: Commit template","fromName":"Marcel Holtmann","fromEmail":"marcel@holtmann.org","sentAt":"2005-05-08T20:03:21Z","receivedAt":"2005-05-08T20:03:21Z","isPatch":false,"sender":{"key":"marcel@holtmann.org","avatar":null},"body":"Hi Sean,\n\n> > if you don't put any CG: lines in the commit template you screw up the\n> > look of the modified files list. So I propose to leave all the CG: lines\n> > additions as they are in cg-commit and only add the template in front of\n> > it.\n> \n> Yes, but you're free to make it look however you like.  Here's a sample:\n> \n> CG: -[DO NOT COMMIT!]-------------------------------------------\n> CG:\n> CG: Hey! You don't want to commit here, use a cloned repository!\n> CG:\n> \n> \n> and another:\n> \n> CG: -[USB CHANGES REPO!]----------------------------------------\n> CG:\n> CG: Commit only USB changes here!\n> CG:\n> \n> Signed-off-by: Sean Estabrooks <seanlkml@sympatico.ca>\n> CG:\n> CG:\n> \n> The trailing CG: lines ensure that those added by cg-commit look okay.\n> It's not perfect, but it's a nice feature.\n\nmy argument is; not to mess up with the CG: lines created by cg-commit.\nIf you wanna insert a warning then you can of course add additional CG:\nlines to the commit template.\n\nRegards\n\nMarcel\n\n\n"},{"id":"2814","messageId":"2159.10.10.10.24.1115582791.squirrel@linux1","threadId":"536","inReplyTo":"1115582601.8949.31.camel@pegasus","subject":"Re: Commit template","fromName":"Sean","fromEmail":"seanlkml@sympatico.ca","sentAt":"2005-05-08T20:06:31Z","receivedAt":"2005-05-08T20:06:31Z","isPatch":false,"sender":{"key":"seanlkml@sympatico.ca","avatar":"https://gravatar.com/avatar/f92923f54fc08c401fc59b71829d4b89e9b8087fbba45ff87c82e6a83aee02ae?d=mp&s=160"},"body":"On Sun, May 8, 2005 4:03 pm, Marcel Holtmann said:\n\n> my argument is; not to mess up with the CG: lines created by cg-commit.\n> If you wanna insert a warning then you can of course add additional CG:\n> lines to the commit template.\n\nMarcel,\n\nWell, i'd argue that anyone making their own commit should be responsible\nfor making it look however they like.  Maybe they want to only use only 60\ncharacter wide lines and are tired of seeing the notice about CG: being\nignored.  Gives the power user a tad more flexibility.   But I really\ndon't care much either way.\n\nSean\n\n\n"},{"id":"2815","messageId":"20050508201723.GH9495@pasky.ji.cz","threadId":"536","inReplyTo":"2159.10.10.10.24.1115582791.squirrel@linux1","subject":"Re: Commit template","fromName":"Petr Baudis","fromEmail":"pasky@ucw.cz","sentAt":"2005-05-08T20:17:23Z","receivedAt":"2005-05-08T20:17:23Z","isPatch":false,"sender":{"key":"pasky@ucw.cz","avatar":"https://avatars.githubusercontent.com/u/18439?v=4"},"body":"Dear diary, on Sun, May 08, 2005 at 10:06:31PM CEST, I got a letter\nwhere Sean <seanlkml@sympatico.ca> told me that...\n> On Sun, May 8, 2005 4:03 pm, Marcel Holtmann said:\n> \n> > my argument is; not to mess up with the CG: lines created by cg-commit.\n> > If you wanna insert a warning then you can of course add additional CG:\n> > lines to the commit template.\n> \n> Marcel,\n> \n> Well, i'd argue that anyone making their own commit should be responsible\n> for making it look however they like.  Maybe they want to only use only 60\n> character wide lines and are tired of seeing the notice about CG: being\n> ignored.  Gives the power user a tad more flexibility.   But I really\n> don't care much either way.\n\nI'm with Sean on this one - implemented (with current cg-commit, and I\nused .git/commit-template file instead), committed, pushed out.\n\nSean, could you please sign off the patches you send to the mailing list\nin the future?\n\nThanks,\n\n-- \n\t\t\t\tPetr \"Pasky\" Baudis\nStuff: http://pasky.or.cz/\nC++: an octopus made by nailing extra legs onto a dog. -- Steve Taylor\n"},{"id":"2818","messageId":"1115584617.8949.51.camel@pegasus","threadId":"536","inReplyTo":"20050508201723.GH9495@pasky.ji.cz","subject":"Re: Commit template","fromName":"Marcel Holtmann","fromEmail":"marcel@holtmann.org","sentAt":"2005-05-08T20:36:57Z","receivedAt":"2005-05-08T20:36:57Z","isPatch":false,"sender":{"key":"marcel@holtmann.org","avatar":null},"body":"Hi Petr,\n\n> > > my argument is; not to mess up with the CG: lines created by cg-commit.\n> > > If you wanna insert a warning then you can of course add additional CG:\n> > > lines to the commit template.\n> > \n> > Well, i'd argue that anyone making their own commit should be responsible\n> > for making it look however they like.  Maybe they want to only use only 60\n> > character wide lines and are tired of seeing the notice about CG: being\n> > ignored.  Gives the power user a tad more flexibility.   But I really\n> > don't care much either way.\n> \n> I'm with Sean on this one - implemented (with current cg-commit, and I\n> used .git/commit-template file instead), committed, pushed out.\n\nthen please do a \"touch .git/commit-template\" and call cg-commit. Now\nyou will see what I mean. It is too easy to screw up.\n\nWhy not leave the list of modified files in the hand of the cg-commit\nand people that wanna extra text inside their commit-template add\nsomething like:\n\nCG: ---\nCG: This is my testing tree, don't commit\n\nThis will look much prettier and gives people the same possibilities to\nchange everything. If you wanna make the modified files list into a full\nconfigurable template, then I think you must introduce place holders.\n\nAlso an option to suppress the list of modified files is possible.\n\nRegards\n\nMarcel\n\n\n"},{"id":"2820","messageId":"20050508204043.GJ9495@pasky.ji.cz","threadId":"536","inReplyTo":"1115584617.8949.51.camel@pegasus","subject":"Re: Commit template","fromName":"Petr Baudis","fromEmail":"pasky@ucw.cz","sentAt":"2005-05-08T20:40:43Z","receivedAt":"2005-05-08T20:40:43Z","isPatch":false,"sender":{"key":"pasky@ucw.cz","avatar":"https://avatars.githubusercontent.com/u/18439?v=4"},"body":"Dear diary, on Sun, May 08, 2005 at 10:36:57PM CEST, I got a letter\nwhere Marcel Holtmann <marcel@holtmann.org> told me that...\n> Hi Petr,\n> \n> > > > my argument is; not to mess up with the CG: lines created by cg-commit.\n> > > > If you wanna insert a warning then you can of course add additional CG:\n> > > > lines to the commit template.\n> > > \n> > > Well, i'd argue that anyone making their own commit should be responsible\n> > > for making it look however they like.  Maybe they want to only use only 60\n> > > character wide lines and are tired of seeing the notice about CG: being\n> > > ignored.  Gives the power user a tad more flexibility.   But I really\n> > > don't care much either way.\n> > \n> > I'm with Sean on this one - implemented (with current cg-commit, and I\n> > used .git/commit-template file instead), committed, pushed out.\n> \n> then please do a \"touch .git/commit-template\" and call cg-commit. Now\n> you will see what I mean. It is too easy to screw up.\n\nSo don't touch .git/commit-template. It's not like it stops working, you\njust don't get the top stuff. Which you probably wanted, why would you\ntouch .git/commit-template otherwise?\n\n> Why not leave the list of modified files in the hand of the cg-commit\n> and people that wanna extra text inside their commit-template add\n> something like:\n> \n> CG: ---\n> CG: This is my testing tree, don't commit\n> \n> This will look much prettier and gives people the same possibilities to\n> change everything.\n\nBut you have extra stuff both before and after the list of modified\nfiles.\n\n> If you wanna make the modified files list into a full configurable\n> template, then I think you must introduce place holders.\n\nThat's what I was thinking about, actually - @@MODIFIED@@ and such, and\nit replaces _all_ the CG: stuff. Just decided that I have better things\nto do now personally.\n\n-- \n\t\t\t\tPetr \"Pasky\" Baudis\nStuff: http://pasky.or.cz/\nC++: an octopus made by nailing extra legs onto a dog. -- Steve Taylor\n"},{"id":"2825","messageId":"1115586556.8949.65.camel@pegasus","threadId":"536","inReplyTo":"20050508204043.GJ9495@pasky.ji.cz","subject":"Re: Commit template","fromName":"Marcel Holtmann","fromEmail":"marcel@holtmann.org","sentAt":"2005-05-08T21:09:16Z","receivedAt":"2005-05-08T21:09:16Z","isPatch":false,"sender":{"key":"marcel@holtmann.org","avatar":null},"body":"Hi Petr,\n\n> > > > > my argument is; not to mess up with the CG: lines created by cg-commit.\n> > > > > If you wanna insert a warning then you can of course add additional CG:\n> > > > > lines to the commit template.\n> > > > \n> > > > Well, i'd argue that anyone making their own commit should be responsible\n> > > > for making it look however they like.  Maybe they want to only use only 60\n> > > > character wide lines and are tired of seeing the notice about CG: being\n> > > > ignored.  Gives the power user a tad more flexibility.   But I really\n> > > > don't care much either way.\n> > > \n> > > I'm with Sean on this one - implemented (with current cg-commit, and I\n> > > used .git/commit-template file instead), committed, pushed out.\n> > \n> > then please do a \"touch .git/commit-template\" and call cg-commit. Now\n> > you will see what I mean. It is too easy to screw up.\n> \n> So don't touch .git/commit-template. It's not like it stops working, you\n> just don't get the top stuff. Which you probably wanted, why would you\n> touch .git/commit-template otherwise?\n\nmaybe I am the only one who sees a problem here and thinks that it is a\nmis-design. Let me try one last time to explain it. We speak here about\nend users of Cogito, right? They don't know what is inside the scripts\nand how they work. So you tell them that they can create a commit\ntemplate that will be presented at every commit time. So lets do it.\n\n---snip---\n[PATCH]\n\nSigned-off-by: Marcel Holtmann <marcel@holtmann.org>\n---snip---\n\nI would create a file like this and save it as .git/commit-template,\nbecause I don't really know about the CG: lines and actually I don't\nreally care, because they get deleted anyway. Stupid as I am, I am\nexpecting now something like this:\n\n---snip---\n[PATCH]\n\nSigned-off-by: Marcel Holtmann <marcel@holtmann.org>\nCG: -----------------------------------------------------------------------\nCG: Lines beginning with the CG: prefix are removed automatically\nCG:\nCG: Modified files:\nCG:    Makefile\nCG: -----------------------------------------------------------------------\n---snip---\n\nBut instead I am getting this:\n\n---snip---\n\n[PATCH]\n\nSigned-off-by: Marcel Holtmann <marcel@holtmann.org>\nCG:\nCG: Modified files:\nCG:    Makefile\nCG: -----------------------------------------------------------------------\n---snip---\n\nAs an end user, what would you say?\n\n> > Why not leave the list of modified files in the hand of the cg-commit\n> > and people that wanna extra text inside their commit-template add\n> > something like:\n> > \n> > CG: ---\n> > CG: This is my testing tree, don't commit\n> > \n> > This will look much prettier and gives people the same possibilities to\n> > change everything.\n> \n> But you have extra stuff both before and after the list of modified\n> files.\n\nAdding extra CG: lines in a commit template is only good for reminding\nyou of something, right? Why else would you add them?\n\n> > If you wanna make the modified files list into a full configurable\n> > template, then I think you must introduce place holders.\n> \n> That's what I was thinking about, actually - @@MODIFIED@@ and such, and\n> it replaces _all_ the CG: stuff. Just decided that I have better things\n> to do now personally.\n\nI understand that :)\n\nRegards\n\nMarcel\n\n\n"}]}