git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] git-contacts: Add recognition of Reported-by
Date: Fri, 21 Jul 2017 10:27:01 -0500	[thread overview]
Message-ID: <a8b47a45-0100-dbef-0bff-fdfdb9cbccb4@redhat.com> (raw)
In-Reply-To: <xmqqbmodj1pa.fsf@gitster.mtv.corp.google.com>


[-- Attachment #1.1: Type: text/plain, Size: 3367 bytes --]

On 07/21/2017 09:37 AM, Junio C Hamano wrote:
> Eric Blake <eblake@redhat.com> writes:
> 
>> It's nice to cc someone that reported a bug, in order to let
>> them know that a fix is being considered, and possibly even
>> get their help in reviewing/testing the patch.
>>
>> Signed-off-by: Eric Blake <eblake@redhat.com>
>> ---
> 
> I don't know if this new one deserves to be part of the hardcoded
> defaults; it would be different between the projects and depends on
> their convention.  I notice that there is no way to configure this
> script and I suspect that it would be a more generally useful update
> to have it read a configuration variable that lists what kind of sob
> like things to take addresses from.

You mean, something like

git config --add contacts.autocc Reported-by
git config --add contacts.autocc Suggested-by

where contacts.autocc would be a new multi-valued config option
specifying additional Tag: patterns to scrape out of the commit message?

The idea seems reasonable, except that I have less experience with
writing patches that interact with git config than I do for my one-liner
attempt, so I would welcome any help from someone with more familiarity
with the code base.

Also, putting it in 'git config' still means that it is a per-developer
responsibility to choose which patterns to add to their list.  Is there
any easy way to make a particular repository supply the same list for
all developers who check it out, without them having to munge things?

Also, I'm worried about sendemail.cccmd - that's a script that could
usefully call 'git contacts' under the hood, but that argues that there
should be a command-line override (and not just 'git config') for
choosing an alternative list of autocc tag patterns on a per-invocation
basis.  Again, it requires a per-developer setup to wire in a cccmd, but
telling developers a one-liner config to set up the command is easier
than telling them multiple lines for contacts.autocc.

And while we're on the topic of per-project useful defaults, it would be
nice if diff.orderFile could easily be set to a per-project default,
rather than requiring per-developer efforts to set that up.

But yes, I _definitely_ want to be able for a given project to easily
autocc the tags that it finds appropriate.  Your point that different
projects have different tags makes total sense (I'm hoping to use
Suggested-by as one of the tags in qemu, but agree that it is not as
easy to argue that Suggested-by should be in the hardcoded defaults,
which is why my initial submission only added Reported-by).

> 
> Thanks.
> 
>>  contrib/contacts/git-contacts | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/contrib/contacts/git-contacts b/contrib/contacts/git-contacts
>> index dbe2abf27..85ad732fc 100755
>> --- a/contrib/contacts/git-contacts
>> +++ b/contrib/contacts/git-contacts
>> @@ -11,7 +11,7 @@ use IPC::Open2;
>>
>>  my $since = '5-years-ago';
>>  my $min_percent = 10;
>> -my $labels_rx = qr/Signed-off-by|Reviewed-by|Acked-by|Cc/i;
>> +my $labels_rx = qr/Signed-off-by|Reviewed-by|Acked-by|Cc|Reported-by/i;
>>  my %seen;
>>
>>  sub format_contact {
> 

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 619 bytes --]

  reply	other threads:[~2017-07-21 15:28 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-07-21 14:15 [PATCH] git-contacts: Add recognition of Reported-by Eric Blake
2017-07-21 14:37 ` Junio C Hamano
2017-07-21 15:27   ` Eric Blake [this message]
2017-07-21 16:03     ` Junio C Hamano
2017-07-24 18:31       ` Jeff King
2017-07-24 19:29         ` Junio C Hamano
2017-07-24 19:36           ` Jeff King
2017-07-27 16:45             ` Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a8b47a45-0100-dbef-0bff-fdfdb9cbccb4@redhat.com \
    --to=eblake@redhat.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).