{"thread":{"id":"3296","subject":"[PATCH] Don't send copies to the From: address","startedAt":"2006-02-11T02:47:17Z","lastAt":"2006-02-13T07:20:53Z","messageCount":6,"participants":["Christian Biesinger","Junio C Hamano","Greg KH","Ryan Anderson"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"15895","messageId":"11396260373307-git-send-email-cbiesinger@web.de","threadId":"3296","inReplyTo":null,"subject":"[PATCH] Don't send copies to the From: address","fromName":"Christian Biesinger","fromEmail":"cbiesinger@web.de","sentAt":"2006-02-11T02:47:17Z","receivedAt":"2006-02-11T02:47:17Z","isPatch":true,"sender":{"key":"cbiesinger@web.de","avatar":null},"body":"Sending copies to the from address is pointless. Not\nsending copies there makes it possible to do:\n\n  git-format-patch --mbox origin\n  git-send-email 00*\n\nand get a reasonable result.\n\nSigned-off-by: Christian Biesinger <cbiesinger@web.de>\n\n---\n\n git-send-email.perl |   16 ++++++++++------\n 1 files changed, 10 insertions(+), 6 deletions(-)\n\n486a15e29dff39ff5885d7a1e38d6c5c3b70127b\ndiff --git a/git-send-email.perl b/git-send-email.perl\nindex 3f1b3ca..31d23d6 100755\n--- a/git-send-email.perl\n+++ b/git-send-email.perl\n@@ -304,9 +304,11 @@ foreach my $t (@files) {\n \t\t\t\t\t$subject = $1;\n \n \t\t\t\t} elsif (/^(Cc|From):\\s+(.*)$/) {\n-\t\t\t\t\tprintf(\"(mbox) Adding cc: %s from line '%s'\\n\",\n-\t\t\t\t\t\t$2, $_) unless $quiet;\n-\t\t\t\t\tpush @cc, $2;\n+\t\t\t\t\tunless ($2 eq $from) {\n+\t\t\t\t\t\tprintf(\"(mbox) Adding cc: %s from line '%s'\\n\",\n+\t\t\t\t\t\t\t$2, $_) unless $quiet;\n+\t\t\t\t\t\tpush @cc, $2;\n+\t\t\t\t\t}\n \t\t\t\t}\n \n \t\t\t} else {\n@@ -335,9 +337,11 @@ foreach my $t (@files) {\n \t\t\tif (/^Signed-off-by: (.*)$/i) {\n \t\t\t\tmy $c = $1;\n \t\t\t\tchomp $c;\n-\t\t\t\tpush @cc, $c;\n-\t\t\t\tprintf(\"(sob) Adding cc: %s from line '%s'\\n\",\n-\t\t\t\t\t$c, $_) unless $quiet;\n+\t\t\t\tunless ($c eq $from) {\n+\t\t\t\t\tpush @cc, $c;\n+\t\t\t\t\tprintf(\"(sob) Adding cc: %s from line '%s'\\n\",\n+\t\t\t\t\t\t$c, $_) unless $quiet;\n+\t\t\t\t}\n \t\t\t}\n \t\t}\n \t}\n-- \n1.1.6.g71f7-dirty\n"},{"id":"15898","messageId":"7vk6c2sg66.fsf@assigned-by-dhcp.cox.net","threadId":"3296","inReplyTo":"11396260373307-git-send-email-cbiesinger@web.de","subject":"Re: [PATCH] Don't send copies to the From: address","fromName":"Junio C Hamano","fromEmail":"junkio@cox.net","sentAt":"2006-02-11T03:55:13Z","receivedAt":"2006-02-11T03:55:13Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Christian Biesinger <cbiesinger@web.de> writes:\n\n> Sending copies to the from address is pointless.\n\nRyan, care to defend this part of the code?  This behaviour\nmight have been inherited from Greg's original version.\n\nI cannot speak for Ryan or Greg, but I think the script\ndeliberately does this to support this workflow:\n\n (1) The original author sends in a patch to a subsystem\n     maintainer;\n\n (2) The subsystem maintainer applies the patch to her tree,\n     perhaps with her own sign-off and sign-offs by other people\n     collected from the list.  She examines it and says this\n     patch is good;\n\n (3) The commit is formatted and sent to higher level of the\n     foodchain.  The message is CC'ed to interested parties in\n     order to notify that the patch progressed in the\n     foodchain.\n\nMe, personally I do not like CC: to people on the signed-off-by\nlist, but dropping a note to From: person makes perfect sense to\nme, if it is to notify the progress of the patch.\n\nWhat you are after _might_ be not CC'ing it if it was your own\npatch.  Maybe something like this would help, but even if that\nis the case I suspect many people want to CC herself so it needs\nto be an optional feature.\n\n-- >8 --\n[PATCH] Do not CC me\n\n---\ngit diff\ndiff --git a/git-send-email.perl b/git-send-email.perl\nindex 3f1b3ca..a02e2f8 100755\n--- a/git-send-email.perl\n+++ b/git-send-email.perl\n@@ -343,7 +343,7 @@ foreach my $t (@files) {\n \t}\n \tclose F;\n \n-\t$cc = join(\", \", unique_email_list(@cc));\n+\t$cc = join(\", \", unique_email_list(grep { $_ ne $from } @cc));\n \n \tsend_message();\n \n"},{"id":"15903","messageId":"20060211045256.GA23066@kroah.com","threadId":"3296","inReplyTo":"7vk6c2sg66.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH] Don't send copies to the From: address","fromName":"Greg KH","fromEmail":"greg@kroah.com","sentAt":"2006-02-11T04:52:56Z","receivedAt":"2006-02-11T04:52:56Z","isPatch":true,"sender":{"key":"greg@kroah.com","avatar":"https://gravatar.com/avatar/5bb5aa0cc2e01c00ec899d11130c07796bc186e465bae57bc34873b13b72c7c8?d=mp&s=160"},"body":"On Fri, Feb 10, 2006 at 07:55:13PM -0800, Junio C Hamano wrote:\n> Christian Biesinger <cbiesinger@web.de> writes:\n> \n> > Sending copies to the from address is pointless.\n> \n> Ryan, care to defend this part of the code?  This behaviour\n> might have been inherited from Greg's original version.\n> \n> I cannot speak for Ryan or Greg, but I think the script\n> deliberately does this to support this workflow:\n> \n>  (1) The original author sends in a patch to a subsystem\n>      maintainer;\n> \n>  (2) The subsystem maintainer applies the patch to her tree,\n>      perhaps with her own sign-off and sign-offs by other people\n>      collected from the list.  She examines it and says this\n>      patch is good;\n> \n>  (3) The commit is formatted and sent to higher level of the\n>      foodchain.  The message is CC'ed to interested parties in\n>      order to notify that the patch progressed in the\n>      foodchain.\n> \n> Me, personally I do not like CC: to people on the signed-off-by\n> list, but dropping a note to From: person makes perfect sense to\n> me, if it is to notify the progress of the patch.\n\nYes, they specifically should be notified of the progress of their\npatch.  And I like the fact that everyone else on the signed-off-by\nchain also get's cc: too.  It keeps everyone in the loop so they know\nwhat is going on.\n\n> What you are after _might_ be not CC'ing it if it was your own\n> patch.  Maybe something like this would help, but even if that\n> is the case I suspect many people want to CC herself so it needs\n> to be an optional feature.\n\nHeh, getting a patch sent back to yourself this way is not a real big\ndeal at all :)\n\nSo, I really do not like this proposed patch at all.\n\nthanks,\n\ngreg k-h\n"},{"id":"15916","messageId":"43EDD911.3030003@web.de","threadId":"3296","inReplyTo":"7vk6c2sg66.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH] Don't send copies to the From: address","fromName":"Christian Biesinger","fromEmail":"cbiesinger@web.de","sentAt":"2006-02-11T12:31:13Z","receivedAt":"2006-02-11T12:31:13Z","isPatch":true,"sender":{"key":"cbiesinger@web.de","avatar":null},"body":"Junio C Hamano wrote:\n> I cannot speak for Ryan or Greg, but I think the script\n> deliberately does this to support this workflow:\n\nYeah, I suspected that this was the usecase. I don't think the patch \nbreaks that, it just compares those addresses to $from, i.e. the address \nfrom which the email is sent.\n\n> Me, personally I do not like CC: to people on the signed-off-by\n> list, but dropping a note to From: person makes perfect sense to\n> me, if it is to notify the progress of the patch.\n\nI guess my description was a bit ambiguous, I didn't mean From: as in \n\"author of the patch\", but instead From: as in \"the email header for the \nsender of the message\", that is, the person who invokes git-send-email.\n\n> What you are after _might_ be not CC'ing it if it was your own\n> patch.  Maybe something like this would help, but even if that\n> is the case I suspect many people want to CC herself so it needs\n> to be an optional feature.\n\nSo a new --no-cc-self option?\n\n> -\t$cc = join(\", \", unique_email_list(@cc));\n> +\t$cc = join(\", \", unique_email_list(grep { $_ ne $from } @cc));\n\nThis seems to be basically the same as what my patch does, except that \nyour way seems better :-)\n"},{"id":"15917","messageId":"43EDD9AE.70405@web.de","threadId":"3296","inReplyTo":"20060211045256.GA23066@kroah.com","subject":"Re: [PATCH] Don't send copies to the From: address","fromName":"Christian Biesinger","fromEmail":"cbiesinger@web.de","sentAt":"2006-02-11T12:33:50Z","receivedAt":"2006-02-11T12:33:50Z","isPatch":true,"sender":{"key":"cbiesinger@web.de","avatar":null},"body":"Greg KH wrote:\n>> Me, personally I do not like CC: to people on the signed-off-by\n>> list, but dropping a note to From: person makes perfect sense to\n>> me, if it is to notify the progress of the patch.\n> \n> Yes, they specifically should be notified of the progress of their\n> patch.  And I like the fact that everyone else on the signed-off-by\n> chain also get's cc: too.  It keeps everyone in the loop so they know\n> what is going on.\n\nI didn't break that! At least, I don't think I did, and I didn't intend to.\n\n> Heh, getting a patch sent back to yourself this way is not a real big\n> deal at all :)\n\nMaybe... but if I send the patch to a mailing list (like this one), this \nmeans I get it twice. I guess that's already true for replies to the \npatch, so maybe I should just live with it...\n"},{"id":"16025","messageId":"20060213072053.GA5540@mythryan2.michonline.com","threadId":"3296","inReplyTo":"7vk6c2sg66.fsf@assigned-by-dhcp.cox.net","subject":"Re: [PATCH] Don't send copies to the From: address","fromName":"Ryan Anderson","fromEmail":"ryan@michonline.com","sentAt":"2006-02-13T07:20:53Z","receivedAt":"2006-02-13T07:20:53Z","isPatch":true,"sender":{"key":"ryan@michonline.com","avatar":null},"body":"On Fri, Feb 10, 2006 at 07:55:13PM -0800, Junio C Hamano wrote:\n> Christian Biesinger <cbiesinger@web.de> writes:\n> \n> > Sending copies to the from address is pointless.\n> \n> Ryan, care to defend this part of the code?  This behaviour\n> might have been inherited from Greg's original version.\n> \n> I cannot speak for Ryan or Greg, but I think the script\n> deliberately does this to support this workflow:\n> \n>  (1) The original author sends in a patch to a subsystem\n>      maintainer;\n> \n>  (2) The subsystem maintainer applies the patch to her tree,\n>      perhaps with her own sign-off and sign-offs by other people\n>      collected from the list.  She examines it and says this\n>      patch is good;\n> \n>  (3) The commit is formatted and sent to higher level of the\n>      foodchain.  The message is CC'ed to interested parties in\n>      order to notify that the patch progressed in the\n>      foodchain.\n> \n> Me, personally I do not like CC: to people on the signed-off-by\n> list, but dropping a note to From: person makes perfect sense to\n> me, if it is to notify the progress of the patch.\n\nThat's the thinking I've been using everytime I think about how that\ncode works.\n\n> What you are after _might_ be not CC'ing it if it was your own\n> patch.  Maybe something like this would help, but even if that\n> is the case I suspect many people want to CC herself so it needs\n> to be an optional feature.\n\nThis is probably along the right lines, but there are a few other things\nwe need as well.\n\nI'm thinking of \"don't add my email to cc:\", as well ass \"don't add cc:s\nfrom From and Signed-off-by\" as an option.\n\nSo, please feel free to commit this one, and I'll send a patch in a\nminute or two for the other half.\n\n> \n> -- >8 --\n> [PATCH] Do not CC me\n> \n> ---\n> git diff\n> diff --git a/git-send-email.perl b/git-send-email.perl\n> index 3f1b3ca..a02e2f8 100755\n> --- a/git-send-email.perl\n> +++ b/git-send-email.perl\n> @@ -343,7 +343,7 @@ foreach my $t (@files) {\n>  \t}\n>  \tclose F;\n>  \n> -\t$cc = join(\", \", unique_email_list(@cc));\n> +\t$cc = join(\", \", unique_email_list(grep { $_ ne $from } @cc));\n>  \n>  \tsend_message();\n>  \n> \n> \n> \n> \n\n-- \n\nRyan Anderson\n  sometimes Pug Majere\n"}]}