{"thread":{"id":"9897","subject":"[PATCH 1/1] git-send-email: Add a --suppress-all option","startedAt":"2007-09-17T18:33:57Z","lastAt":"2007-09-18T14:39:37Z","messageCount":6,"participants":["Felipe Balbi","Andreas Ericsson","J. Bruce Fields","David Kastrup"],"isPatch":true,"patchVersion":1,"patchTotal":1},"messages":[{"id":"53337","messageId":"11900540373215-git-send-email-felipebalbi@users.sourceforge.net","threadId":"9897","inReplyTo":null,"subject":"[PATCH 1/1] git-send-email: Add a --suppress-all option","fromName":"Felipe Balbi","fromEmail":"felipebalbi@users.sourceforge.net","sentAt":"2007-09-17T18:33:57Z","receivedAt":"2007-09-17T18:33:57Z","isPatch":true,"sender":{"key":"felipebalbi@users.sourceforge.net","avatar":null},"body":"From: Felipe Balbi <felipe.lima@indt.org.br>\n\nThis patch adds a --suppress-all option to avoid sending emails\nto everybody but the ones listed by --to option.\n\nSigned-off-by: Felipe Balbi <felipe.lima@indt.org.br>\n---\n git-send-email.perl |   16 ++++++++++++----\n 1 files changed, 12 insertions(+), 4 deletions(-)\n\ndiff --git a/git-send-email.perl b/git-send-email.perl\nindex d8319d4..e845c5f 100755\n--- a/git-send-email.perl\n+++ b/git-send-email.perl\n@@ -88,6 +88,9 @@ Options:\n    --suppress-from Suppress sending emails to yourself if your address\n                   appears in a From: line. Defaults to off.\n \n+   --suppress-all Suppress sending emails to everybody but addresses\n+\t\t  listed by --to option.\n+\n    --thread       Specify that the \"In-Reply-To:\" header should be set on all\n                   emails. Defaults to on.\n \n@@ -171,7 +174,7 @@ if ($@) {\n my ($quiet, $dry_run) = (0, 0);\n \n # Variables with corresponding config settings\n-my ($thread, $chain_reply_to, $suppress_from, $signed_off_cc, $cc_cmd);\n+my ($thread, $chain_reply_to, $suppress_from, $suppress_all, $signed_off_cc, $cc_cmd);\n my ($smtp_server, $smtp_authuser, $smtp_authpass, $smtp_ssl);\n my ($identity, $aliasfiletype, @alias_files);\n \n@@ -179,6 +182,7 @@ my %config_bool_settings = (\n     \"thread\" => [\\$thread, 1],\n     \"chainreplyto\" => [\\$chain_reply_to, 1],\n     \"suppressfrom\" => [\\$suppress_from, 0],\n+    \"suppressall\" => [\\$suppress_all, 0],\n     \"signedoffcc\" => [\\$signed_off_cc, 1],\n     \"smtpssl\" => [\\$smtp_ssl, 0],\n );\n@@ -212,6 +216,7 @@ my $rc = GetOptions(\"sender|from=s\" => \\$sender,\n \t\t    \"quiet\" => \\$quiet,\n \t\t    \"cc-cmd=s\" => \\$cc_cmd,\n \t\t    \"suppress-from!\" => \\$suppress_from,\n+\t\t    \"suppress-all!\" => \\$suppress_all,\n \t\t    \"signed-off-cc|signed-off-by-cc!\" => \\$signed_off_cc,\n \t\t    \"dry-run\" => \\$dry_run,\n \t\t    \"envelope-sender=s\" => \\$envelope_sender,\n@@ -662,8 +667,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\tif (unquote_rfc2047($2) eq $sender) {\n-\t\t\t\t\t\tnext if ($suppress_from);\n+\t\t\t\t\tif (unquote_rfc2047($2)) {\n+\t\t\t\t\t\tnext if ($suppress_all);\n+\t\t\t\t\t}\n+\t\t\t\t\telsif (unquote_rfc2047($2) eq $sender) {\n+\t\t\t\t\t\tnext if ($suppress_from|$suppress_all);\n \t\t\t\t\t}\n \t\t\t\t\telsif ($1 eq 'From') {\n \t\t\t\t\t\t$author = unquote_rfc2047($2);\n@@ -700,7 +708,7 @@ foreach my $t (@files) {\n \t\t\t}\n \t\t} else {\n \t\t\t$message .=  $_;\n-\t\t\tif (/^(Signed-off-by|Cc): (.*)$/i && $signed_off_cc) {\n+\t\t\tif (/^(Signed-off-by|Cc): (.*)$/i && $signed_off_cc && !$suppress_all) {\n \t\t\t\tmy $c = $2;\n \t\t\t\tchomp $c;\n \t\t\t\tpush @cc, $c;\n-- \n1.5.3.1.91.gd3392\n"},{"id":"53408","messageId":"46EF8107.1030607@op5.se","threadId":"9897","inReplyTo":"11900540373215-git-send-email-felipebalbi@users.sourceforge.net","subject":"Re: [PATCH 1/1] git-send-email: Add a --suppress-all option","fromName":"Andreas Ericsson","fromEmail":"ae@op5.se","sentAt":"2007-09-18T07:40:55Z","receivedAt":"2007-09-18T07:40:55Z","isPatch":true,"sender":{"key":"ae@op5.se","avatar":"https://gravatar.com/avatar/426e89595c75a8f5252dd0c989e5fabe5bcac616e68557427ad9aef6b0ca342a?d=mp&s=160"},"body":"Felipe Balbi wrote:\n> From: Felipe Balbi <felipe.lima@indt.org.br>\n> \n> This patch adds a --suppress-all option to avoid sending emails\n> to everybody but the ones listed by --to option.\n> \n\nTo my minds eye, --suppress-all is equivalent to --dry-run. Could you\nrename it to \"--cc-nobody\" or some such?\n\nOn a side-note, I've never really understood why git-send-email *by default*\nsends to a bazillion people. Does anybody ever use it without suppressing\nmost of the CC targets?\n\n-- \nAndreas Ericsson                   andreas.ericsson@op5.se\nOP5 AB                             www.op5.se\nTel: +46 8-230225                  Fax: +46 8-230231\n"},{"id":"53475","messageId":"20070918132251.GB12120@fieldses.org","threadId":"9897","inReplyTo":"46EF8107.1030607@op5.se","subject":"Re: [PATCH 1/1] git-send-email: Add a --suppress-all option","fromName":"J. Bruce Fields","fromEmail":"bfields@fieldses.org","sentAt":"2007-09-18T13:22:51Z","receivedAt":"2007-09-18T13:22:51Z","isPatch":true,"sender":{"key":"bfields@citi.umich.edu","avatar":null},"body":"On Tue, Sep 18, 2007 at 09:40:55AM +0200, Andreas Ericsson wrote:\n> Felipe Balbi wrote:\n>> From: Felipe Balbi <felipe.lima@indt.org.br>\n>> This patch adds a --suppress-all option to avoid sending emails\n>> to everybody but the ones listed by --to option.\n>\n> To my minds eye, --suppress-all is equivalent to --dry-run. Could you\n> rename it to \"--cc-nobody\" or some such?\n>\n> On a side-note, I've never really understood why git-send-email *by \n> default*\n> sends to a bazillion people. Does anybody ever use it without suppressing\n> most of the CC targets?\n\nYes.  I never suppress the cc's.  The cc-everyone thing is standard on\nthe kernel mailing lists.\n\nThe one exception is if I'm just sending the series to myself as a test.\n\n--b.\n"},{"id":"53477","messageId":"31e679430709180629p328abba8ud4c4ce7fef7645e4@mail.gmail.com","threadId":"9897","inReplyTo":"20070918132251.GB12120@fieldses.org","subject":"Re: [PATCH 1/1] git-send-email: Add a --suppress-all option","fromName":"Felipe Balbi","fromEmail":"felipebalbi@users.sourceforge.net","sentAt":"2007-09-18T13:29:02Z","receivedAt":"2007-09-18T13:29:02Z","isPatch":true,"sender":{"key":"felipebalbi@users.sourceforge.net","avatar":null},"body":"Hi,\n\nOn 9/18/07, J. Bruce Fields <bfields@fieldses.org> wrote:\n> On Tue, Sep 18, 2007 at 09:40:55AM +0200, Andreas Ericsson wrote:\n> > Felipe Balbi wrote:\n> >> From: Felipe Balbi <felipe.lima@indt.org.br>\n> >> This patch adds a --suppress-all option to avoid sending emails\n> >> to everybody but the ones listed by --to option.\n> >\n> > To my minds eye, --suppress-all is equivalent to --dry-run. Could you\n> > rename it to \"--cc-nobody\" or some such?\n> >\n> > On a side-note, I've never really understood why git-send-email *by\n> > default*\n> > sends to a bazillion people. Does anybody ever use it without suppressing\n> > most of the CC targets?\n>\n> Yes.  I never suppress the cc's.  The cc-everyone thing is standard on\n> the kernel mailing lists.\n>\n> The one exception is if I'm just sending the series to myself as a test.\n\nAnd that the motivation for this patch :-p\n\nInternally (in my company, where I work), we send patches to each\nother for code review before sending it publicly.\n\n>\n> --b.\n>\n\n\n-- \nBest Regards,\n\nFelipe Balbi\nfelipebalbi@users.sourceforge.net\n"},{"id":"53482","messageId":"86bqc03vrq.fsf@lola.quinscape.zz","threadId":"9897","inReplyTo":"20070918132251.GB12120@fieldses.org","subject":"Re: [PATCH 1/1] git-send-email: Add a --suppress-all option","fromName":"David Kastrup","fromEmail":"dak@gnu.org","sentAt":"2007-09-18T14:15:05Z","receivedAt":"2007-09-18T14:15:05Z","isPatch":true,"sender":{"key":"dak@gnu.org","avatar":"https://avatars.githubusercontent.com/u/52141349?v=4"},"body":"\"J. Bruce Fields\" <bfields@fieldses.org> writes:\n\n> On Tue, Sep 18, 2007 at 09:40:55AM +0200, Andreas Ericsson wrote:\n>> Felipe Balbi wrote:\n>>> From: Felipe Balbi <felipe.lima@indt.org.br>\n>>> This patch adds a --suppress-all option to avoid sending emails\n>>> to everybody but the ones listed by --to option.\n>>\n>> To my minds eye, --suppress-all is equivalent to --dry-run. Could you\n>> rename it to \"--cc-nobody\" or some such?\n>>\n>> On a side-note, I've never really understood why git-send-email *by \n>> default*\n>> sends to a bazillion people. Does anybody ever use it without suppressing\n>> most of the CC targets?\n>\n> Yes.  I never suppress the cc's.  The cc-everyone thing is standard on\n> the kernel mailing lists.\n>\n> The one exception is if I'm just sending the series to myself as a test.\n\nWouldn't --no-cc be a nicer option name?\n\n-- \nDavid Kastrup\n"},{"id":"53485","messageId":"31e679430709180739xf2eaa32i8233059fbfb38f12@mail.gmail.com","threadId":"9897","inReplyTo":"86bqc03vrq.fsf@lola.quinscape.zz","subject":"Re: [PATCH 1/1] git-send-email: Add a --suppress-all option","fromName":"Felipe Balbi","fromEmail":"felipebalbi@users.sourceforge.net","sentAt":"2007-09-18T14:39:37Z","receivedAt":"2007-09-18T14:39:37Z","isPatch":true,"sender":{"key":"felipebalbi@users.sourceforge.net","avatar":null},"body":"Hi,\n\nOn 9/18/07, David Kastrup <dak@gnu.org> wrote:\n> \"J. Bruce Fields\" <bfields@fieldses.org> writes:\n>\n> > On Tue, Sep 18, 2007 at 09:40:55AM +0200, Andreas Ericsson wrote:\n> >> Felipe Balbi wrote:\n> >>> From: Felipe Balbi <felipe.lima@indt.org.br>\n> >>> This patch adds a --suppress-all option to avoid sending emails\n> >>> to everybody but the ones listed by --to option.\n> >>\n> >> To my minds eye, --suppress-all is equivalent to --dry-run. Could you\n> >> rename it to \"--cc-nobody\" or some such?\n> >>\n> >> On a side-note, I've never really understood why git-send-email *by\n> >> default*\n> >> sends to a bazillion people. Does anybody ever use it without suppressing\n> >> most of the CC targets?\n> >\n> > Yes.  I never suppress the cc's.  The cc-everyone thing is standard on\n> > the kernel mailing lists.\n> >\n> > The one exception is if I'm just sending the series to myself as a test.\n>\n> Wouldn't --no-cc be a nicer option name?\n\nIt'll probably conflict if I don't wanna CC patch's author nor\nSigned-off-by but DO want to CC somebody special like the maintainer.\n\nthe option is changed to --cc-nobody and it's already resent. :-)\n\n>\n> --\n> David Kastrup\n>\n> -\n> To unsubscribe from this list: send the line \"unsubscribe git\" in\n> the body of a message to majordomo@vger.kernel.org\n> More majordomo info at  http://vger.kernel.org/majordomo-info.html\n>\n\n\n-- \nBest Regards,\n\nFelipe Balbi\nfelipebalbi@users.sourceforge.net\n"}]}