Subject: Re: [RFC v2] git-multimail: a replacement for post-receive-email

From: Michael Haggerty <[email-masked]>
Date: Sun, 24 Feb 2013 06:53:47 +0100

On 02/20/2013 01:28 PM, Matthieu Moy wrote:
> Michael Haggerty <[email-masked]> writes:
>> A while ago, I submitted an RFC for adding a new email notification
>> script to "contrib" [...]
> 
> We've discussed offline with Michael, a few patches have been merged,
> and there are still a few pending pull requests. I liked the script
> already, but it's getting even cooler ;-).
> 
> A few more random thoughts (not on my personal todo-list):
> 
> [...]
> 
> * Perhaps we should allow a per-branch configuration, like
> 
>   [multimailhook]
> 	mailingList = [email-masked]
>   [multimailhook "refs/heads/my-branch"]
>         mailingList = [email-masked]
>         <whateverOtherConfig> = <whateverOtherValue>
> 
>   Branch specific would override value for Config.get(), and
>   Config.get_all() should probably list both the branch-specific and the
>   other keys.

I wonder whether it would be to far off the beaten path to allow glob
patterns in the branch specification; e.g.,

   [multimailhook "refs/heads/release-*"]
         mailingList = [email-masked]

For the case of multiple glob patterns matching a branch name, there
would probably have to be a notion of "best match", but that doesn't
seem too difficult.  The matching would have to take place when looking
up individual options to avoid having to replicate the full
configuration for each pattern.

This feature could also be used to get the functionality of your
proposal for skipRefs and onlyRefs [1] in a more general way:

   [multimailhook]
         mailingList = [email-masked]
   [multimailhook "refs/heads/user/$USER/*"]
         mailingList = ""

Michael

[1] Proposed feature to allow certain references to be ignored for the
purpose of notification emails; see

    https://github.com/mhagger/git-multimail/pull/15

-- 
Michael Haggerty
[email-masked]
http://softwareswirl.blogspot.com/