{"thread":{"id":"34706","subject":"[PATCH] send-email uses contacts to propose recipients","startedAt":"2013-08-15T22:17:49Z","lastAt":"2013-08-15T22:38:56Z","messageCount":4,"participants":["Stefan Beller","Eric Sunshine","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"225293","messageId":"1376605069-525-1-git-send-email-stefanbeller@googlemail.com","threadId":"34706","inReplyTo":null,"subject":"[PATCH] send-email uses contacts to propose recipients","fromName":"Stefan Beller","fromEmail":"stefanbeller@googlemail.com","sentAt":"2013-08-15T22:17:49Z","receivedAt":"2013-08-15T22:17:49Z","isPatch":true,"sender":{"key":"stefanbeller@gmail.com","avatar":"https://avatars.githubusercontent.com/u/455868?v=4"},"body":"I have got an idea regarding the send-email. If there are no recipients\ngiven, it could propose recipients using the new 'git contacts'\nThis would help people new to projects to not forget people, who may have\nthe most knowledge reviewing that specific patch.\n\nUnfortunately I cannot read/write perl, so I cannot solve it\nmyself in the near future, but I'd put it on my todo list for later.\n---\n git-send-email.perl | 6 ++++++\n 1 file changed, 6 insertions(+)\n\ndiff --git a/git-send-email.perl b/git-send-email.perl\nindex 2162478..a34723d 100755\n--- a/git-send-email.perl\n+++ b/git-send-email.perl\n@@ -757,6 +757,12 @@ $sender = sanitize_address($sender);\n \n my $prompting = 0;\n if (!@initial_to && !defined $to_cmd) {\n+\tif (git contacts is available) {\n+\t\tproposed senders = git contacts on the same range or set of patches\n+\t\tprint \"Suggesting these receivers:\\n\"\n+\t\tprint proposed senders\n+\t}\n+\n \tmy $to = ask(\"Who should the emails be sent to (if any)? \",\n \t\t     default => \"\",\n \t\t     valid_re => qr/\\@.*\\./, confirm_only => 1);\n-- \n1.8.4.rc3.1.gc1ebd90\n"},{"id":"225294","messageId":"CAPig+cSZFU4oBuJCSXC+0Mgjegh4MzWCsDqdRYPLtwazwhy--Q@mail.gmail.com","threadId":"34706","inReplyTo":"1376605069-525-1-git-send-email-stefanbeller@googlemail.com","subject":"Re: [PATCH] send-email uses contacts to propose recipients","fromName":"Eric Sunshine","fromEmail":"sunshine@sunshineco.com","sentAt":"2013-08-15T22:28:22Z","receivedAt":"2013-08-15T22:28:22Z","isPatch":true,"sender":{"key":"sunshine@sunshineco.com","avatar":"https://avatars.githubusercontent.com/u/163641?v=4"},"body":"On Thu, Aug 15, 2013 at 6:17 PM, Stefan Beller\n<stefanbeller@googlemail.com> wrote:\n> I have got an idea regarding the send-email. If there are no recipients\n> given, it could propose recipients using the new 'git contacts'\n> This would help people new to projects to not forget people, who may have\n> the most knowledge reviewing that specific patch.\n\nYou can already do this with git-send-email's --cc-cmd option or\nsendmail.cccmd configuration variable.\n\n> Unfortunately I cannot read/write perl, so I cannot solve it\n> myself in the near future, but I'd put it on my todo list for later.\n> ---\n>  git-send-email.perl | 6 ++++++\n>  1 file changed, 6 insertions(+)\n>\n> diff --git a/git-send-email.perl b/git-send-email.perl\n> index 2162478..a34723d 100755\n> --- a/git-send-email.perl\n> +++ b/git-send-email.perl\n> @@ -757,6 +757,12 @@ $sender = sanitize_address($sender);\n>\n>  my $prompting = 0;\n>  if (!@initial_to && !defined $to_cmd) {\n> +       if (git contacts is available) {\n\ngit-contacts is very slow, so at the very least you would want to\nprompt before invoking it.\n\n> +               proposed senders = git contacts on the same range or set of patches\n> +               print \"Suggesting these receivers:\\n\"\n> +               print proposed senders\n> +       }\n> +\n>         my $to = ask(\"Who should the emails be sent to (if any)? \",\n>                      default => \"\",\n>                      valid_re => qr/\\@.*\\./, confirm_only => 1);\n> --\n> 1.8.4.rc3.1.gc1ebd90\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"},{"id":"225295","messageId":"7vhaeqpoyh.fsf@alter.siamese.dyndns.org","threadId":"34706","inReplyTo":"1376605069-525-1-git-send-email-stefanbeller@googlemail.com","subject":"Re: [PATCH] send-email uses contacts to propose recipients","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2013-08-15T22:29:58Z","receivedAt":"2013-08-15T22:29:58Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Stefan Beller <stefanbeller@googlemail.com> writes:\n\n> I have got an idea regarding the send-email. If there are no recipients\n> given, it could propose recipients using the new 'git contacts'\n> This would help people new to projects to not forget people, who may have\n> the most knowledge reviewing that specific patch.\n>\n> Unfortunately I cannot read/write perl, so I cannot solve it\n> myself in the near future, but I'd put it on my todo list for later.\n> ---\n>  git-send-email.perl | 6 ++++++\n>  1 file changed, 6 insertions(+)\n>\n> diff --git a/git-send-email.perl b/git-send-email.perl\n> index 2162478..a34723d 100755\n> --- a/git-send-email.perl\n> +++ b/git-send-email.perl\n> @@ -757,6 +757,12 @@ $sender = sanitize_address($sender);\n>  \n>  my $prompting = 0;\n>  if (!@initial_to && !defined $to_cmd) {\n> +\tif (git contacts is available) {\n> +\t\tproposed senders = git contacts on the same range or set of patches\n> +\t\tprint \"Suggesting these receivers:\\n\"\n> +\t\tprint proposed senders\n> +\t}\n> +\n>  \tmy $to = ask(\"Who should the emails be sent to (if any)? \",\n>  \t\t     default => \"\",\n>  \t\t     valid_re => qr/\\@.*\\./, confirm_only => 1);\n\nCute.\n\nIt is OK while \"contacts\" is in contrib/, because people who has\n\"git contact\" are those who opted into the heuristics of implemented\nby that script. But if we are to eventually move the script out of\nthe contrib/ area, we may have to restrict \"is available\" a bit\ntighter.  Not everybody has to agree with its heuristics before the\nscript moves out of the contrib/ area, so there will be users who\nare annoyed by the suggestion the script makes, which may not suit\ntheir needs at all.\n\nFor contributors of _this_ list, the above will not kick in at all,\nas they should always have sendemail.to set to the list, and\n@initial_to will not be empty for them.\n"},{"id":"225297","messageId":"7v4naqpojj.fsf@alter.siamese.dyndns.org","threadId":"34706","inReplyTo":"7vhaeqpoyh.fsf@alter.siamese.dyndns.org","subject":"Re: [PATCH] send-email uses contacts to propose recipients","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2013-08-15T22:38:56Z","receivedAt":"2013-08-15T22:38:56Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Junio C Hamano <gitster@pobox.com> writes:\n\n> ... we may have to restrict \"is available\" a bit\n> tighter.\n\nAs Eric pointed out, that \"bit tighter\" opt-in could just be an\nexplicit use of --cc-cmd option to specify this script ;-)\n"}]}