git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Support for config wildcards
@ 2007-03-13 16:47 Bill Lear
  2007-03-13 17:03 ` Junio C Hamano
  0 siblings, 1 reply; 4+ messages in thread
From: Bill Lear @ 2007-03-13 16:47 UTC (permalink / raw)
  To: git

I would like to use our update hook to send email to recipients based
on a branch name pattern.  For example, the "abc" team would get email
for all updates to branches that start with the word "abc".

I would like to write something like this in the config file:

[hooks.mail.recipients]
        xyz.pickle = me, you, betty-sue
        xyz* = joe, jaya, julie
        abc* = mark, nancy, svetlana
        taug* = sridhar, pete, joe
        * = me, you, big-boss

Then, in the update hook, do something like this (very
pseudo-code-ish):

    for key, value in $(git config --get-regexp hooks.mail.recipients*); do
        key=${key#hooks.mail.recipients}
        if $(matches $key $branch); then
            recipients=$value
            break
        fi
    done

Which would allow me to change the mailing list recipients based
on the branch without having to update the update hook each time.

But, apparently at least the '*' and '.' characters are not allowed as
keys, and I can't seem to escape them.

Is there a way to do this sort of thing that I am missing?


Bill

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2007-03-13 19:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-13 16:47 Support for config wildcards Bill Lear
2007-03-13 17:03 ` Junio C Hamano
2007-03-13 18:10   ` Bill Lear
2007-03-13 19:50     ` 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).