Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to add additional text when sending an email with git send-email?

Tags:

git

I am sending patches using git send-email <patch-name>.

I want that the email sent with the patch to have some additional text added at the top, besides the commit message.

Is there any way to do this?

like image 297
Daniel Băluţă Avatar asked Dec 12 '11 10:12

Daniel Băluţă


1 Answers

You can use --annotate, then just add your comment between the two --- of the patch, it won't affect the very patch.

Ref: https://kparal.wordpress.com/2011/08/03/git-tip-of-the-day-introduction-text-when-emailing-patches/

eg:

From 7ea3c50fa83950549de11c6834c465bc8f28b52b Mon Sep 17 00:00:00 2001
From: James Laska
Date: Mon, 1 Aug 2011 09:53:16 -0400
Subject: [PATCH] compose_tree - Save the setup.sh script for later debugging

---
This patch is really really important, because otherwise the 
world will end in 2012. Please accept it.

 tests/compose_tree/compose_tree.sh |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/tests/compose_tree/compose_tree.sh b/tests/compose_tree/compose_tree.sh
index 66ecefd..c2e041d 100755
--- a/tests/compose_tree/compose_tree.sh
+++ b/tests/compose_tree/compose_tree.sh
... (the rest of the patch)
like image 194
Jason Chen Avatar answered Oct 31 '22 04:10

Jason Chen