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

Mail after commit

From
CSClaudio Scordino <cloud.of.andor@gmail.com>
Date
Jun 12, 2007, 15:32 UTC
Message-ID
<466EBC7E.8040104@gmail.com>
Hi all.

To have an email sent after every commit, I've put the following command in .git/hooks/post-commit:

rm -f /tmp/git-commit.patch ; git-format-patch --stdout -s `git log --pretty=oneline | awk '{print $1}' | sed -n '2p'` > /tmp/git-commit.patch ; git-send-email --no-signed-off-by-cc --to XXX --from YYY /tmp/git-commit.patch ; rm -f /tmp/git-commit.patch

and it works, indeed.
However, it's quite tricky.
Doesn't exist any way to make it simpler ?
Regards,
          Claudio
Next: Martin Langhoff
Message 1 of 6 in “Mail after commit”
  1. Claudio ScordinoJun 12, 2007
  2. Martin LanghoffJun 12, 2007
  3. Jan-Benedict GlawJun 13, 2007
  4. Andy ParkinsJun 13, 2007
  5. Martin LanghoffJun 13, 2007
  6. Jan-Benedict GlawJun 13, 2007

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.