[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Improved git commit emails
From: |
Rüdiger Sonderfeld |
Subject: |
Re: Improved git commit emails |
Date: |
Thu, 23 Jan 2014 19:42:25 +0100 |
User-agent: |
KMail/4.11.3 (Linux/3.11.0-14-generic; KDE/4.11.3; x86_64; ; ) |
On Sunday 19 January 2014 18:09:18 Bob Proulx wrote:
> Glenn Morris wrote:
> > Thanks. It seems like an improvement.
> >
> > Is it possible to add a "Mail-Followup-To: committer, emacs-devel"
> > header?
>
> I see no support for doing so. I see only this section.
It supports changing it by including git_multimail.py and changing the
template variable values.
E.g., using the following as post-receive hook (requires git_multimail.py to
be in the hooks directory) might work
-- 8< --------------------------------------------------------------- >8 --
#! /usr/bin/env python2
import sys
import os
import git_multimail
#git_multimail.DEBUG = True
git_multimail.FOOTER_TEMPLATE = ""
git_multimail.REFCHANGE_HEADER_TEMPLATE = """\
To: %(recipients)s
Subject: %(subject)s
MIME-Version: 1.0
Content-Type: text/plain; charset=%(charset)s
Content-Transfer-Encoding: 8bit
Message-ID: %(msgid)s
From: %(fromaddr)s
Reply-To: %(reply_to)s
Mail-Followup-To: %(fromaddr)s, address@hidden
X-Git-Repo: %(repo_shortname)s
X-Git-Refname: %(refname)s
X-Git-Reftype: %(refname_type)s
X-Git-Oldrev: %(oldrev)s
X-Git-Newrev: %(newrev)s
Auto-Submitted: auto-generated
"""
git_multimail.REFCHANGE_INTRO_TEMPLATE = """\
%(pusher)s pushed a change to %(refname_type)s %(short_refname)s
in repository %(repo_shortname)s.
"""
git_multimail.REVISION_HEADER_TEMPLATE = """\
To: %(recipients)s
Subject: %(emailprefix)s%(num)02d/%(tot)02d: %(oneline)s
MIME-Version: 1.0
Content-Type: text/plain; charset=%(charset)s
Content-Transfer-Encoding: 8bit
From: %(fromaddr)s
Reply-To: %(reply_to)s
Mail-Followup-To: %(fromaddr)s, address@hidden
In-Reply-To: %(reply_to_msgid)s
References: %(reply_to_msgid)s
X-Git-Repo: %(repo_shortname)s
X-Git-Refname: %(refname)s
X-Git-Reftype: %(refname_type)s
X-Git-Rev: %(rev)s
Auto-Submitted: auto-generated
"""
git_multimail.REVISION_INTRO_TEMPLATE = """\
%(pusher)s pushed a commit to %(refname_type)s %(short_refname)s
in repository %(repo_shortname)s.
"""
git_multimail.REVISION_FOOTER_TEMPLATE = git_multimail.FOOTER_TEMPLATE
# To debug use
# git_multimail.main(sys.argv[1:]+ ['--stdout'])
git_multimail.main(sys.argv[1:])
-- 8< --------------------------------------------------------------- >8 --
That way changing git_multimail.py is not necessary and therefore upgrading it
should be less hassle. But I'm not sure if the code encodes the Mail-
Followup-To header correctly.
See "Customizing email contents" and "Customizing git-multimail for your
environment" in git_multimail's README.
Regards,
Rüdiger
- Re: Improved git commit emails, (continued)
- Re: Improved git commit emails, Glenn Morris, 2014/01/08
- Re: Improved git commit emails, Ted Zlatanov, 2014/01/08
- Re: Improved git commit emails, Bob Proulx, 2014/01/12
- Re: Improved git commit emails, Glenn Morris, 2014/01/12
- Re: Improved git commit emails, Bob Proulx, 2014/01/14
- Re: Improved git commit emails, Glenn Morris, 2014/01/15
- Re: Improved git commit emails, Bob Proulx, 2014/01/19
- Re: Improved git commit emails, Stephen J. Turnbull, 2014/01/19
- Re: Improved git commit emails, Bob Proulx, 2014/01/19
- Re: Improved git commit emails, Glenn Morris, 2014/01/22
- Re: Improved git commit emails,
Rüdiger Sonderfeld <=
- Re: Improved git commit emails, Bob Proulx, 2014/01/28
- Re: Improved git commit emails, Glenn Morris, 2014/01/28
- Re: Improved git commit emails, Bob Proulx, 2014/01/30
Re: Git transition checklist, Eric S. Raymond, 2014/01/08
Re: Git transition checklist, Eric S. Raymond, 2014/01/08
Re: Git transition checklist, Glenn Morris, 2014/01/08