Subject: Re: git send-email: How to modify subject prefix?

From: "Shawn O. Pearce" <[email-masked]>
Date: Fri, 24 Apr 2009 08:22:27 -0700

Constantine Plotnikov <[email-masked]> wrote:
> I'm interested how to modify subject prefix when sending patches using
> git send-email. I want it to prefix the subject with [JGIT PATCH]
> instead of [PATCH] and I have not found any option that allows it.

Here's how I send email, the trick is to set the subject on
format-patch not on send-email:

_sop/dump.sh
--8<--
base="${1:-master}" &&
if [ $(git rev-list ^$base HEAD | wc -l) -gt 1 ]
then
	n="--numbered --cover-letter"
fi &&
git format-patch \
	--output-directory _sop/OUT \
	--subject-prefix='JGIT PATCH' \
	-M \
	$n \
	$base || exit
----

_sop/send.sh
--8<--
git send-email \
	--to 'Robin Rosenberg <[email-masked]>' \
	--cc [email-masked]' \
	--chain-reply-to \
	--suppress-cc self \
	--smtp-server localhost \
	--smtp-server-port 8025 \
	_sop/OUT
----

-- 
Shawn.