Re: git send-email: How to modify subject prefix?
- From
Shawn O. Pearce <spearce@spearce.org>
- Date
- Apr 24, 2009, 15:22 UTC
- Message-ID
- <20090424152227.GY23604@spearce.org>
- In-Reply-To
- <85647ef50904240818s41fffc2eh798083a24ab53750@mail.gmail.com>
Constantine Plotnikov <constantine.plotnikov@gmail.com> 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 <robin.rosenberg@dewire.com>' \ --cc 'git@vger.kernel.org' \ --chain-reply-to \ --suppress-cc self \ --smtp-server localhost \ --smtp-server-port 8025 \ _sop/OUT ----
-- Shawn.