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

前端 未结 3 708
陌清茗
陌清茗 2021-02-08 15:55

I am sending patches using git send-email .

I want that the email sent with the patch to have some additional text added at the top, besid

3条回答
  •  广开言路
    2021-02-08 16:24

    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)
    

提交回复
热议问题