git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [RFC] Add a new email notification script to "contrib"

From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Date
Nov 8, 2012, 15:38 UTC
Message-ID
<CACBZZX4gzgTZCk78PYpYHnKdwQ0vScoLz02tuAuUQRXVVXSLVg@mail.gmail.com>
In-Reply-To
<509BA2E7.4080102@alum.mit.edu>
On Thu, Nov 8, 2012 at 1:17 PM, Michael Haggerty <mhagger@alum.mit.edu> wrote:
Show 21 quoted lines
> On 11/08/2012 12:39 PM, Ævar Arnfjörð Bjarmason wrote:
>> [...]
>
> I'm glad it's getting some use.  Thanks for the feedback.
>
>> I'll test it out some more, the issues I've had with it so far in
>> migrating from the existing script + some custom hacks we have to it
>> have been:
>>
>>  * Overly verbose default templates, easy to overwrite now. Might send
>>    patches for some of them.
>
> The templating is currently not super flexible nor very well documented,
> but simple changes should be easy enough.  I mostly carried over the
> text explanations from the old post-receive-email script; it is true
> that they are quite verbose.
>
>>  * No ability to link to a custom gitweb, probably easy now.
>
> What do you mean by "a custom gitweb"?  What are the commitmail issues
> involved?

Just for the E-Mail to include a link to http://gitweb.example.com/git/....?h=$our_hash etc.

Show 46 quoted lines
>>  * If someone only pushes one commit I'd like to only have one e-mail
>>    with the diff, but if they push multiple commits I'd like to have a
>>    summary e-mail and replies to that which have the patches.
>>
>>    It only seemed to support the latter mode, so you send out two
>>    e-mails for pushing one commit.
>
> That's correct, and I've also thought about the feature that you
> described.  I think it would be pretty easy to implement; it is only not
> quite obvious to which mailing list(s?) such emails should be sent.
>
>>  * Ability to limit the number of lines, but not line length, that's
>>    handy for some template repositories. Should be easy to add
>
> Should too-long lines be folded or truncated?  Either way, it should be
> pretty straightforward (Python even has a textwrap module that could be
> used).
>
>> But in addition to that we have our own custom E-Mail notification
>> scripts for:
>>
>>  * People can subscribe to changes to certain files. I.e. if you
>>    modify very_important.c we'll send an E-Mail to a more widely seen
>>    review list.
>>
>>  * Invididuals can also edit a config file to watch individual files /
>>    glob patterns of files, e.g. src/main.c or src/crypto*
>
> I implemented something like this back when we were using Subversion,
> but it didn't get much use and seemed like more configuration hassle
> than it was worth.
>
> If this were implemented and I asked for notifications about a
> particular file, and a particular reference change affects the file,
> what should I see?
>
> * The summary email for the reference change (yes/no)?
>
> * Detail emails for all commits within the reference change, or only for
> the individual commits that modify the file?
>
> * Should the detail emails include the full patch for the corresponding
> commit, or only the diffs affecting the file(s) of interest?  (The
> latter would start to get expensive, because the script would have to
> generate individual emails per subscriber instead of letting sendmail
> fan the emails out across all subscribers.)

I think just sending the individual patch e-mails to all people who subscribe to paths that got changed in that patch that match their watchlist makes sense.

That's how an internal E-mailing script that I'm hopign to replace with this works.

That script *also* supports sending the whole batch of patches pushed in that push to someone watching any file that got modified in one of the patches, in case you also want to get other stuff pushed in pushes for files you're interested in.

But it doesn't generate individual E-Mails per recipient. I think that way lies madness because as you rightly point out you have to start worrying about the combinatorial nightmare of generating the E-mails per subscriber.

Show 12 quoted lines
>> I think a good way to support that would be to have either a path to a
>> config file with those watch specs, or a command so you could run "git
>> show ..." on some repo users can push to.
>
> *How* this feature would be configured depends strongly on how the repo
> is hosted.  For example, gitolite has a well-developed scheme for how
> the server should be configured, and it would make sense to work
> together with that.  Other people might configure user access via LDAP
> or Apache.
>
>> But overall it's very nice. I'll make some time to test it in my
>> organization (with lots of commits and people reading commit e-mails).
Previous: Michael HaggertyNext: Michael Haggerty
Message 19 of 26 in “[RFC] Add a new email notification script to "contrib"”
  1. mhagger@alum.mit.eduJul 14, 2012
  2. Stefan NäweJul 14, 2012
  3. Michael HaggertyJul 15, 2012
  4. Junio C HamanoJul 15, 2012
  5. Michael HaggertyJul 15, 2012
  6. Marc BranchaudJul 16, 2012
  7. Michael HaggertyJul 16, 2012
  8. Matthieu MoyJul 16, 2012
  9. Michael HaggertyJul 16, 2012
  10. Junio C HamanoJul 16, 2012
  11. Michael HaggertyJul 16, 2012
  12. Junio C HamanoJul 16, 2012
  13. Matthieu MoyJul 18, 2012
  14. Michael HaggertyJul 20, 2012
  15. Ævar Arnfjörð BjarmasonNov 7, 2012
  16. Michael HaggertyNov 8, 2012
  17. Ævar Arnfjörð BjarmasonNov 8, 2012
  18. Michael HaggertyNov 8, 2012
  19. Ævar Arnfjörð BjarmasonNov 8, 2012
  20. Michael HaggertyNov 22, 2012
  21. Marc BranchaudNov 8, 2012
  22. Ævar Arnfjörð BjarmasonNov 8, 2012
  23. Marc BranchaudNov 8, 2012
  24. Marc BranchaudNov 8, 2012
  25. Michael HaggertyNov 22, 2012
  26. Stefan NaeweJul 14, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.