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

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

From
Matthieu Moy <matthieu.moy@grenoble-inp.fr>
Date
Jul 18, 2012, 07:52 UTC
Message-ID
<vpqobndld4v.fsf@bauges.imag.fr>
In-Reply-To
<1342249182-5937-1-git-send-email-mhagger@alum.mit.edu>
mhagger@alum.mit.edu writes:
> * One email per commit [1].  For each reference change, the script
>   first emits one email summarizing the reference change (including
>   one-line summaries of the new commits), then emits a separate email
>   for each new commit that was introduced, including patches.

I have a dirty hack to do that on my private repositories (instead of sending mail on receive, the script runs as a cron job, does a "git fetch" on each repo on my machine, and sends me patches for new commits with "git send-email"). I had several problems with it:

* Binary content was sometimes embedded in the patch. It's cool that
  "git send-email" can base64-encode content when I send a patch to
  someone, but it's counter-productive when used for code review. So, I
  used "git format-patch --no-binary".
* Even with that, I sometimes had overly long lines (e.g. non-text files
  that were shown as a one long line, I don't remember exactly the
  use-case, probably postscript files or so) that were confusing my
  mailer. So, I added
    # Truncate long lines
    perl -pi -e 's/^(.{500}).*/$1 [...]/' $patches
  to my script to truncate them.

You probably want to test these cases, and allow (configurably) the user to do some cleanup on patches before they are sent.

-- 
Matthieu Moy
http://www-verimag.imag.fr/~moy/
Previous: Junio C HamanoNext: Michael Haggerty
Message 13 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.