{"thread":{"id":"38537","subject":"Is there some way to suppress Cc email only to stable?","startedAt":"2015-02-09T19:42:24Z","lastAt":"2015-02-10T00:35:01Z","messageCount":11,"participants":["Paul E. McKenney","Junio C Hamano","Jonathan Nieder","Greg KH"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"255841","messageId":"20150209194224.GA27482@linux.vnet.ibm.com","threadId":"38537","inReplyTo":null,"subject":"Is there some way to suppress Cc email only to stable?","fromName":"Paul E. McKenney","fromEmail":"paulmck@linux.vnet.ibm.com","sentAt":"2015-02-09T19:42:24Z","receivedAt":"2015-02-09T19:42:24Z","isPatch":false,"sender":{"key":"paulmck@linux.vnet.ibm.com","avatar":null},"body":"Hello!\n\nI need to be able to put the following Cc in a git commit:\n\nCc: <stable@vger.kernel.org>\n\nYet I cannot allow git-send-email to actually send email to that address,\nlest I get an automated nastygram in response.  I found the --to-cmd=\noption to git-send-email, but it looks to only add email addresses, never\ndelete them.  I also found the --suppress-cc= option to git-send-email,\nbut it appears to suppress all Cc emails, not just selected ones.\n\nOne approach that occurred to me is to hand-edit the files produced\nby git-format-patch, removing stable@vger.kernel.org entirely prior to\nusing git-send-email.  However, this is a bit error-prone.  Yes, I could\nscript it, but with my luck, I will eventually end up having my script\nmangle some patch, for example to the Linux kernel's MAINTAINERS file.\nFurthermore, this approach means that people reviewing the patches\ncannot see the Cc stable entries (though I could presumably comment them\nout somehow).\n\nAnother approach is to add the stable Ccs just before doing the pull\nrequest, by my upstream maintainer is not fond of that approach.  Nor am\nI, as it would be all to easy to forget to add the stable Ccs.  Or to\nget them wrong.\n\nI can't be the only person wanting to do something like this.  So is\nthere some git option that I am missing here?\n\n\t\t\t\t\t\t\tThanx, Paul\n"},{"id":"255849","messageId":"xmqq386eby6w.fsf@gitster.dls.corp.google.com","threadId":"38537","inReplyTo":"20150209194224.GA27482@linux.vnet.ibm.com","subject":"Re: Is there some way to suppress Cc email only to stable?","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2015-02-09T20:57:11Z","receivedAt":"2015-02-09T20:57:11Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Paul E. McKenney\" <paulmck@linux.vnet.ibm.com> writes:\n\n> I need to be able to put the following Cc in a git commit:\n>\n> Cc: <stable@vger.kernel.org>\n>\n> Yet I cannot allow git-send-email to actually send email to that address,\n> lest I get an automated nastygram in response.  I found the --to-cmd=\n> option to git-send-email, but it looks to only add email addresses, never\n> delete them.  I also found the --suppress-cc= option to git-send-email,\n> but it appears to suppress all Cc emails, not just selected ones.\n>\n> One approach that occurred to me is to hand-edit the files produced\n> by git-format-patch, removing stable@vger.kernel.org entirely prior to\n> using git-send-email.  However, this is a bit error-prone.  Yes, I could\n> script it, but with my luck, I will eventually end up having my script\n> mangle some patch, for example to the Linux kernel's MAINTAINERS file.\n> Furthermore, this approach means that people reviewing the patches\n> cannot see the Cc stable entries (though I could presumably comment them\n> out somehow).\n>\n> Another approach is to add the stable Ccs just before doing the pull\n> request, by my upstream maintainer is not fond of that approach.  Nor am\n> I, as it would be all to easy to forget to add the stable Ccs.  Or to\n> get them wrong.\n>\n> I can't be the only person wanting to do something like this.  So is\n> there some git option that I am missing here?\n\nNo, I do not think we have a way to blacklist certain recipient\naddresses from getting passed to the MTA, and I do not object to\naddition of such a mechanism if there is a valid need to do so.\n\nIt feels a bit too convoluted to say \"Cc: to this address\" in the\nlog message and then \"nonono, I do not want to send there\", though.\nWhy do you want to have Cc: in the log message if you do not want to\nsend e-mail to that address in the first place?  Allowing the\nbehaviour you are asking for would mean that those who see that the\ncommit appeared on a branch would not be able to assume that the\npatch has already been sent to the stable review address, no?\n"},{"id":"255853","messageId":"20150209211021.GB4166@linux.vnet.ibm.com","threadId":"38537","inReplyTo":"xmqq386eby6w.fsf@gitster.dls.corp.google.com","subject":"Re: Is there some way to suppress Cc email only to stable?","fromName":"Paul E. McKenney","fromEmail":"paulmck@linux.vnet.ibm.com","sentAt":"2015-02-09T21:10:21Z","receivedAt":"2015-02-09T21:10:21Z","isPatch":false,"sender":{"key":"paulmck@linux.vnet.ibm.com","avatar":null},"body":"On Mon, Feb 09, 2015 at 12:57:11PM -0800, Junio C Hamano wrote:\n> \"Paul E. McKenney\" <paulmck@linux.vnet.ibm.com> writes:\n> \n> > I need to be able to put the following Cc in a git commit:\n> >\n> > Cc: <stable@vger.kernel.org>\n> >\n> > Yet I cannot allow git-send-email to actually send email to that address,\n> > lest I get an automated nastygram in response.  I found the --to-cmd=\n> > option to git-send-email, but it looks to only add email addresses, never\n> > delete them.  I also found the --suppress-cc= option to git-send-email,\n> > but it appears to suppress all Cc emails, not just selected ones.\n> >\n> > One approach that occurred to me is to hand-edit the files produced\n> > by git-format-patch, removing stable@vger.kernel.org entirely prior to\n> > using git-send-email.  However, this is a bit error-prone.  Yes, I could\n> > script it, but with my luck, I will eventually end up having my script\n> > mangle some patch, for example to the Linux kernel's MAINTAINERS file.\n> > Furthermore, this approach means that people reviewing the patches\n> > cannot see the Cc stable entries (though I could presumably comment them\n> > out somehow).\n> >\n> > Another approach is to add the stable Ccs just before doing the pull\n> > request, by my upstream maintainer is not fond of that approach.  Nor am\n> > I, as it would be all to easy to forget to add the stable Ccs.  Or to\n> > get them wrong.\n> >\n> > I can't be the only person wanting to do something like this.  So is\n> > there some git option that I am missing here?\n> \n> No, I do not think we have a way to blacklist certain recipient\n> addresses from getting passed to the MTA, and I do not object to\n> addition of such a mechanism if there is a valid need to do so.\n> \n> It feels a bit too convoluted to say \"Cc: to this address\" in the\n> log message and then \"nonono, I do not want to send there\", though.\n> Why do you want to have Cc: in the log message if you do not want to\n> send e-mail to that address in the first place?  Allowing the\n> behaviour you are asking for would mean that those who see that the\n> commit appeared on a branch would not be able to assume that the\n> patch has already been sent to the stable review address, no?\n\nI could see where it might seem a bit strange.  ;-)\n\nThe reason behind this is that you are not supposed to actually send\nemail to the stable lists until after the patch has been accepted into\nmainline.  One way to make this work is of course to leave the stable\nCc tags out of the commit log, and to manually send an email when the\ncommit has been accepted.  However, this is subject to human error,\nand more specifically in this case, -my- human error.\n\nHence the desire to have a Cc that doesn't actually send any email,\nbut that is visible in mainline for the benefit of the scripts that\nhandle the stable workflow.\n\n\t\t\t\t\t\t\tThanx, Paul\n"},{"id":"255854","messageId":"xmqqtwyuaipa.fsf@gitster.dls.corp.google.com","threadId":"38537","inReplyTo":"20150209211021.GB4166@linux.vnet.ibm.com","subject":"Re: Is there some way to suppress Cc email only to stable?","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2015-02-09T21:17:05Z","receivedAt":"2015-02-09T21:17:05Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Paul E. McKenney\" <paulmck@linux.vnet.ibm.com> writes:\n\n> On Mon, Feb 09, 2015 at 12:57:11PM -0800, Junio C Hamano wrote:\n>> No, I do not think we have a way to blacklist certain recipient\n>> addresses from getting passed to the MTA, and I do not object to\n>> addition of such a mechanism if there is a valid need to do so.\n>> \n>> It feels a bit too convoluted to say \"Cc: to this address\" in the\n>> log message and then \"nonono, I do not want to send there\", though.\n>> Why do you want to have Cc: in the log message if you do not want to\n>> send e-mail to that address in the first place?  Allowing the\n>> behaviour you are asking for would mean that those who see that the\n>> commit appeared on a branch would not be able to assume that the\n>> patch has already been sent to the stable review address, no?\n>\n> I could see where it might seem a bit strange.  ;-)\n>\n> The reason behind this is that you are not supposed to actually send\n> email to the stable lists until after the patch has been accepted into\n> mainline.  One way to make this work is of course to leave the stable\n> Cc tags out of the commit log, and to manually send an email when the\n> commit has been accepted.  However, this is subject to human error,\n> and more specifically in this case, -my- human error.\n>\n> Hence the desire to have a Cc that doesn't actually send any email,\n> but that is visible in mainline for the benefit of the scripts that\n> handle the stable workflow.\n\nSo a configuration variable that you can set once and forget, e.g.\n\n    [sendemail]\n\tblacklistedRecipients = stable@vger.kernel.org\n\nwould not cut it, as you would _later_ want to send the e-mail once\nthe commit hits the mainline.  Am I reading you correctly?\n\nOr is it that nobody actually sends to stable@vger.kernel.org address\nmanually, but some automated process scans new commits that hit the\nmainline and the string \"Cc: stable@vger.kernel.org\" is used as a cue\nfor that process to pick them up?\n"},{"id":"255859","messageId":"20150209214312.GC4166@linux.vnet.ibm.com","threadId":"38537","inReplyTo":"xmqqtwyuaipa.fsf@gitster.dls.corp.google.com","subject":"Re: Is there some way to suppress Cc email only to stable?","fromName":"Paul E. McKenney","fromEmail":"paulmck@linux.vnet.ibm.com","sentAt":"2015-02-09T21:43:12Z","receivedAt":"2015-02-09T21:43:12Z","isPatch":false,"sender":{"key":"paulmck@linux.vnet.ibm.com","avatar":null},"body":"On Mon, Feb 09, 2015 at 01:17:05PM -0800, Junio C Hamano wrote:\n> \"Paul E. McKenney\" <paulmck@linux.vnet.ibm.com> writes:\n> \n> > On Mon, Feb 09, 2015 at 12:57:11PM -0800, Junio C Hamano wrote:\n> >> No, I do not think we have a way to blacklist certain recipient\n> >> addresses from getting passed to the MTA, and I do not object to\n> >> addition of such a mechanism if there is a valid need to do so.\n> >> \n> >> It feels a bit too convoluted to say \"Cc: to this address\" in the\n> >> log message and then \"nonono, I do not want to send there\", though.\n> >> Why do you want to have Cc: in the log message if you do not want to\n> >> send e-mail to that address in the first place?  Allowing the\n> >> behaviour you are asking for would mean that those who see that the\n> >> commit appeared on a branch would not be able to assume that the\n> >> patch has already been sent to the stable review address, no?\n> >\n> > I could see where it might seem a bit strange.  ;-)\n> >\n> > The reason behind this is that you are not supposed to actually send\n> > email to the stable lists until after the patch has been accepted into\n> > mainline.  One way to make this work is of course to leave the stable\n> > Cc tags out of the commit log, and to manually send an email when the\n> > commit has been accepted.  However, this is subject to human error,\n> > and more specifically in this case, -my- human error.\n> >\n> > Hence the desire to have a Cc that doesn't actually send any email,\n> > but that is visible in mainline for the benefit of the scripts that\n> > handle the stable workflow.\n> \n> So a configuration variable that you can set once and forget, e.g.\n> \n>     [sendemail]\n> \tblacklistedRecipients = stable@vger.kernel.org\n> \n> would not cut it, as you would _later_ want to send the e-mail once\n> the commit hits the mainline.  Am I reading you correctly?\n\nThis would actually work for me.  Once the patch is accepted into\nmainline, I am done with it.  So I should -never- send email to\nstable@vger.kernel.org, unless I am doing so manually, for example because\nI forgot to add the stable tag to a given commit.  But in that case,\nI would just use mutt to forward the patch to stable@vger.kernel.org,\nand git would not be involved.\n\nSo as far as I can see, yes, it would be perfectly OK to unconditionally\nblacklist stable@vger.kernel.org within my git tree.  That would be nice!\n\n> Or is it that nobody actually sends to stable@vger.kernel.org address\n> manually, but some automated process scans new commits that hit the\n> mainline and the string \"Cc: stable@vger.kernel.org\" is used as a cue\n> for that process to pick them up?\n\nI belive that something like this happens, but I don't know the details. \nI do know that it does not involve any of my local git trees.  ;-)\n\n\t\t\t\t\t\t\tThanx, Paul\n"},{"id":"255860","messageId":"xmqqpp9iahct.fsf@gitster.dls.corp.google.com","threadId":"38537","inReplyTo":"20150209214312.GC4166@linux.vnet.ibm.com","subject":"Re: Is there some way to suppress Cc email only to stable?","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2015-02-09T21:46:10Z","receivedAt":"2015-02-09T21:46:10Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"\"Paul E. McKenney\" <paulmck@linux.vnet.ibm.com> writes:\n\n>> > Hence the desire to have a Cc that doesn't actually send any email,\n>> > but that is visible in mainline for the benefit of the scripts that\n>> > handle the stable workflow.\n>> \n>> So a configuration variable that you can set once and forget, e.g.\n>> \n>>     [sendemail]\n>> \tblacklistedRecipients = stable@vger.kernel.org\n>> \n>> would not cut it, as you would _later_ want to send the e-mail once\n>> the commit hits the mainline.  Am I reading you correctly?\n>\n> This would actually work for me.  Once the patch is accepted into\n> mainline, I am done with it.  So I should -never- send email to\n> stable@vger.kernel.org, unless I am doing so manually, for example because\n> I forgot to add the stable tag to a given commit.  But in that case,\n> I would just use mutt to forward the patch to stable@vger.kernel.org,\n> and git would not be involved.\n\nOK, thanks, we have a workable design to let us move forward, then.\n\nGits, any takers?\n"},{"id":"255861","messageId":"20150209215350.GU29365@google.com","threadId":"38537","inReplyTo":"20150209194224.GA27482@linux.vnet.ibm.com","subject":"Re: Is there some way to suppress Cc email only to stable?","fromName":"Jonathan Nieder","fromEmail":"jrnieder@gmail.com","sentAt":"2015-02-09T21:53:50Z","receivedAt":"2015-02-09T21:53:50Z","isPatch":false,"sender":{"key":"jrnieder@gmail.com","avatar":"https://avatars.githubusercontent.com/u/281595?v=4"},"body":"Hi,\n\nPaul E. McKenney wrote:\n\n> Cc: <stable@vger.kernel.org>\n>\n> Yet I cannot allow git-send-email to actually send email to that address,\n> lest I get an automated nastygram in response.\n\nInteresting.  Last time this came up, the result seemed to be\ndifferent[*].\n\nThanks,\nJonathan\n\n[*] http://thread.gmane.org/gmane.comp.version-control.git/178926/focus=178929\n"},{"id":"255863","messageId":"20150209220159.GF4166@linux.vnet.ibm.com","threadId":"38537","inReplyTo":"xmqqpp9iahct.fsf@gitster.dls.corp.google.com","subject":"Re: Is there some way to suppress Cc email only to stable?","fromName":"Paul E. McKenney","fromEmail":"paulmck@linux.vnet.ibm.com","sentAt":"2015-02-09T22:01:59Z","receivedAt":"2015-02-09T22:01:59Z","isPatch":false,"sender":{"key":"paulmck@linux.vnet.ibm.com","avatar":null},"body":"On Mon, Feb 09, 2015 at 01:46:10PM -0800, Junio C Hamano wrote:\n> \"Paul E. McKenney\" <paulmck@linux.vnet.ibm.com> writes:\n> \n> >> > Hence the desire to have a Cc that doesn't actually send any email,\n> >> > but that is visible in mainline for the benefit of the scripts that\n> >> > handle the stable workflow.\n> >> \n> >> So a configuration variable that you can set once and forget, e.g.\n> >> \n> >>     [sendemail]\n> >> \tblacklistedRecipients = stable@vger.kernel.org\n> >> \n> >> would not cut it, as you would _later_ want to send the e-mail once\n> >> the commit hits the mainline.  Am I reading you correctly?\n> >\n> > This would actually work for me.  Once the patch is accepted into\n> > mainline, I am done with it.  So I should -never- send email to\n> > stable@vger.kernel.org, unless I am doing so manually, for example because\n> > I forgot to add the stable tag to a given commit.  But in that case,\n> > I would just use mutt to forward the patch to stable@vger.kernel.org,\n> > and git would not be involved.\n> \n> OK, thanks, we have a workable design to let us move forward, then.\n> \n> Gits, any takers?\n\nWould it help if I offered a beer?  ;-)\n\n\t\t\t\t\t\t\tThanx, Paul\n"},{"id":"255868","messageId":"20150209233537.GG4166@linux.vnet.ibm.com","threadId":"38537","inReplyTo":"20150209215350.GU29365@google.com","subject":"Re: Is there some way to suppress Cc email only to stable?","fromName":"Paul E. McKenney","fromEmail":"paulmck@linux.vnet.ibm.com","sentAt":"2015-02-09T23:35:37Z","receivedAt":"2015-02-09T23:35:37Z","isPatch":false,"sender":{"key":"paulmck@linux.vnet.ibm.com","avatar":null},"body":"On Mon, Feb 09, 2015 at 01:53:50PM -0800, Jonathan Nieder wrote:\n> Hi,\n> \n> Paul E. McKenney wrote:\n> \n> > Cc: <stable@vger.kernel.org>\n> >\n> > Yet I cannot allow git-send-email to actually send email to that address,\n> > lest I get an automated nastygram in response.\n> \n> Interesting.  Last time this came up, the result seemed to be\n> different[*].\n\nHmmm...  Greg KH didn't say there were no automated nastygrams, just\nthat he wasn't worried about it.\n\nI can try it on the next to-be-backported commit and see what happens.\n\n\t\t\t\t\t\t\tThanx, Paul\n\n> Thanks,\n> Jonathan\n> \n> [*] http://thread.gmane.org/gmane.comp.version-control.git/178926/focus=178929\n> \n"},{"id":"255871","messageId":"20150210000319.GD15111@kroah.com","threadId":"38537","inReplyTo":"20150209233537.GG4166@linux.vnet.ibm.com","subject":"Re: Is there some way to suppress Cc email only to stable?","fromName":"Greg KH","fromEmail":"greg@kroah.com","sentAt":"2015-02-10T00:03:19Z","receivedAt":"2015-02-10T00:03:19Z","isPatch":false,"sender":{"key":"greg@kroah.com","avatar":"https://gravatar.com/avatar/5bb5aa0cc2e01c00ec899d11130c07796bc186e465bae57bc34873b13b72c7c8?d=mp&s=160"},"body":"On Mon, Feb 09, 2015 at 03:35:37PM -0800, Paul E. McKenney wrote:\n> On Mon, Feb 09, 2015 at 01:53:50PM -0800, Jonathan Nieder wrote:\n> > Hi,\n> > \n> > Paul E. McKenney wrote:\n> > \n> > > Cc: <stable@vger.kernel.org>\n> > >\n> > > Yet I cannot allow git-send-email to actually send email to that address,\n> > > lest I get an automated nastygram in response.\n> > \n> > Interesting.  Last time this came up, the result seemed to be\n> > different[*].\n> \n> Hmmm...  Greg KH didn't say there were no automated nastygrams, just\n> that he wasn't worried about it.\n> \n> I can try it on the next to-be-backported commit and see what happens.\n\nThere are no \"automated\" nastygrams, it's a \"hit this key to send out\nthis form message\" I have in my email client.\n\nThe only time it triggers a false-positive is when I haven't had enough\ncoffee in the morning, which is what happened recently with a patch from\nJohn Stultz.  If I've sent you that message incorrectly, I'm sorry,\nplease let me know.\n\nAgain, any patch cc:ed to stable that has a stable mark on it in the\nsigned-off-by area is fine, and it helps me to know to watch out for\nthings when they hit Linus's tree, or most importantly, to notice if\nthey somehow _don't_ hit his tree.  Again, some recent patches from John\nfall in to that category, they didn't make it into Linus's tree when\nthey probably should have for 3.19, and now I need to scoop them up\nquickly when they finally do.  If I hadn't been cc:ed on them, I would\nnot have noticed that.\n\nHope this helps explain things,\n\ngreg k-h\n"},{"id":"255873","messageId":"20150210003501.GI4166@linux.vnet.ibm.com","threadId":"38537","inReplyTo":"20150210000319.GD15111@kroah.com","subject":"Re: Is there some way to suppress Cc email only to stable?","fromName":"Paul E. McKenney","fromEmail":"paulmck@linux.vnet.ibm.com","sentAt":"2015-02-10T00:35:01Z","receivedAt":"2015-02-10T00:35:01Z","isPatch":false,"sender":{"key":"paulmck@linux.vnet.ibm.com","avatar":null},"body":"On Tue, Feb 10, 2015 at 08:03:19AM +0800, Greg KH wrote:\n> On Mon, Feb 09, 2015 at 03:35:37PM -0800, Paul E. McKenney wrote:\n> > On Mon, Feb 09, 2015 at 01:53:50PM -0800, Jonathan Nieder wrote:\n> > > Hi,\n> > > \n> > > Paul E. McKenney wrote:\n> > > \n> > > > Cc: <stable@vger.kernel.org>\n> > > >\n> > > > Yet I cannot allow git-send-email to actually send email to that address,\n> > > > lest I get an automated nastygram in response.\n> > > \n> > > Interesting.  Last time this came up, the result seemed to be\n> > > different[*].\n> > \n> > Hmmm...  Greg KH didn't say there were no automated nastygrams, just\n> > that he wasn't worried about it.\n> > \n> > I can try it on the next to-be-backported commit and see what happens.\n> \n> There are no \"automated\" nastygrams, it's a \"hit this key to send out\n> this form message\" I have in my email client.\n> \n> The only time it triggers a false-positive is when I haven't had enough\n> coffee in the morning, which is what happened recently with a patch from\n> John Stultz.  If I've sent you that message incorrectly, I'm sorry,\n> please let me know.\n\nIf that happened, it would have been a while back.\n\n> Again, any patch cc:ed to stable that has a stable mark on it in the\n> signed-off-by area is fine, and it helps me to know to watch out for\n> things when they hit Linus's tree, or most importantly, to notice if\n> they somehow _don't_ hit his tree.  Again, some recent patches from John\n> fall in to that category, they didn't make it into Linus's tree when\n> they probably should have for 3.19, and now I need to scoop them up\n> quickly when they finally do.  If I hadn't been cc:ed on them, I would\n> not have noticed that.\n> \n> Hope this helps explain things,\n\nYep, thank you!  I will add the Cc stable lines as appropriate and stop\nbothering the git guys.  ;-)\n\n\t\t\t\t\t\t\tThanx, Paul\n"}]}