* [PATCH] send-email uses contacts to propose recipients
@ 2013-08-15 22:17 Stefan Beller
2013-08-15 22:28 ` Eric Sunshine
2013-08-15 22:29 ` Junio C Hamano
0 siblings, 2 replies; 4+ messages in thread
From: Stefan Beller @ 2013-08-15 22:17 UTC (permalink / raw)
To: mst, felipe.contreras, bebarino, gitster, git; +Cc: Stefan Beller
I have got an idea regarding the send-email. If there are no recipients
given, it could propose recipients using the new 'git contacts'
This would help people new to projects to not forget people, who may have
the most knowledge reviewing that specific patch.
Unfortunately I cannot read/write perl, so I cannot solve it
myself in the near future, but I'd put it on my todo list for later.
---
git-send-email.perl | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/git-send-email.perl b/git-send-email.perl
index 2162478..a34723d 100755
--- a/git-send-email.perl
+++ b/git-send-email.perl
@@ -757,6 +757,12 @@ $sender = sanitize_address($sender);
my $prompting = 0;
if (!@initial_to && !defined $to_cmd) {
+ if (git contacts is available) {
+ proposed senders = git contacts on the same range or set of patches
+ print "Suggesting these receivers:\n"
+ print proposed senders
+ }
+
my $to = ask("Who should the emails be sent to (if any)? ",
default => "",
valid_re => qr/\@.*\./, confirm_only => 1);
--
1.8.4.rc3.1.gc1ebd90
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] send-email uses contacts to propose recipients
2013-08-15 22:17 [PATCH] send-email uses contacts to propose recipients Stefan Beller
@ 2013-08-15 22:28 ` Eric Sunshine
2013-08-15 22:29 ` Junio C Hamano
1 sibling, 0 replies; 4+ messages in thread
From: Eric Sunshine @ 2013-08-15 22:28 UTC (permalink / raw)
To: Stefan Beller; +Cc: mst, Felipe Contreras, bebarino, Junio C Hamano, Git List
On Thu, Aug 15, 2013 at 6:17 PM, Stefan Beller
<stefanbeller@googlemail.com> wrote:
> I have got an idea regarding the send-email. If there are no recipients
> given, it could propose recipients using the new 'git contacts'
> This would help people new to projects to not forget people, who may have
> the most knowledge reviewing that specific patch.
You can already do this with git-send-email's --cc-cmd option or
sendmail.cccmd configuration variable.
> Unfortunately I cannot read/write perl, so I cannot solve it
> myself in the near future, but I'd put it on my todo list for later.
> ---
> git-send-email.perl | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/git-send-email.perl b/git-send-email.perl
> index 2162478..a34723d 100755
> --- a/git-send-email.perl
> +++ b/git-send-email.perl
> @@ -757,6 +757,12 @@ $sender = sanitize_address($sender);
>
> my $prompting = 0;
> if (!@initial_to && !defined $to_cmd) {
> + if (git contacts is available) {
git-contacts is very slow, so at the very least you would want to
prompt before invoking it.
> + proposed senders = git contacts on the same range or set of patches
> + print "Suggesting these receivers:\n"
> + print proposed senders
> + }
> +
> my $to = ask("Who should the emails be sent to (if any)? ",
> default => "",
> valid_re => qr/\@.*\./, confirm_only => 1);
> --
> 1.8.4.rc3.1.gc1ebd90
>
> --
> To unsubscribe from this list: send the line "unsubscribe git" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] send-email uses contacts to propose recipients
2013-08-15 22:17 [PATCH] send-email uses contacts to propose recipients Stefan Beller
2013-08-15 22:28 ` Eric Sunshine
@ 2013-08-15 22:29 ` Junio C Hamano
2013-08-15 22:38 ` Junio C Hamano
1 sibling, 1 reply; 4+ messages in thread
From: Junio C Hamano @ 2013-08-15 22:29 UTC (permalink / raw)
To: Stefan Beller; +Cc: mst, felipe.contreras, bebarino, git
Stefan Beller <stefanbeller@googlemail.com> writes:
> I have got an idea regarding the send-email. If there are no recipients
> given, it could propose recipients using the new 'git contacts'
> This would help people new to projects to not forget people, who may have
> the most knowledge reviewing that specific patch.
>
> Unfortunately I cannot read/write perl, so I cannot solve it
> myself in the near future, but I'd put it on my todo list for later.
> ---
> git-send-email.perl | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/git-send-email.perl b/git-send-email.perl
> index 2162478..a34723d 100755
> --- a/git-send-email.perl
> +++ b/git-send-email.perl
> @@ -757,6 +757,12 @@ $sender = sanitize_address($sender);
>
> my $prompting = 0;
> if (!@initial_to && !defined $to_cmd) {
> + if (git contacts is available) {
> + proposed senders = git contacts on the same range or set of patches
> + print "Suggesting these receivers:\n"
> + print proposed senders
> + }
> +
> my $to = ask("Who should the emails be sent to (if any)? ",
> default => "",
> valid_re => qr/\@.*\./, confirm_only => 1);
Cute.
It is OK while "contacts" is in contrib/, because people who has
"git contact" are those who opted into the heuristics of implemented
by that script. But if we are to eventually move the script out of
the contrib/ area, we may have to restrict "is available" a bit
tighter. Not everybody has to agree with its heuristics before the
script moves out of the contrib/ area, so there will be users who
are annoyed by the suggestion the script makes, which may not suit
their needs at all.
For contributors of _this_ list, the above will not kick in at all,
as they should always have sendemail.to set to the list, and
@initial_to will not be empty for them.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] send-email uses contacts to propose recipients
2013-08-15 22:29 ` Junio C Hamano
@ 2013-08-15 22:38 ` Junio C Hamano
0 siblings, 0 replies; 4+ messages in thread
From: Junio C Hamano @ 2013-08-15 22:38 UTC (permalink / raw)
To: Stefan Beller; +Cc: Eric Sunshine, mst, felipe.contreras, bebarino, git
Junio C Hamano <gitster@pobox.com> writes:
> ... we may have to restrict "is available" a bit
> tighter.
As Eric pointed out, that "bit tighter" opt-in could just be an
explicit use of --cc-cmd option to specify this script ;-)
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-08-15 22:39 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-15 22:17 [PATCH] send-email uses contacts to propose recipients Stefan Beller
2013-08-15 22:28 ` Eric Sunshine
2013-08-15 22:29 ` Junio C Hamano
2013-08-15 22:38 ` Junio C Hamano
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).