Патч включает в себя версию git в конце - PullRequest
0 голосов
/ 14 марта 2020

git format-patch ставит версию git в конец следующим образом:

From b2df28155560c68772063df3b3250d811e66f35e Mon Sep 17 00:00:00 2001
From: Prem Sichanugrist <prem@example.com>
Date: Mon, 25 Jan 2016 18:18:38 -0500
Subject: [PATCH 1/2] Update build matrix

Build Appraisal against these versions of Ruby

... snip ...

---
 .travis.yml | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index 6b56084..52d0bff 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -3,12 +3,12 @@ sudo: false
 before_install: gem install bundler

 rvm:
-  - 1.8
-  - 1.9
-  - 2.0
-  - 2.1

... snip ...

--
2.7.0

Этот патч скопирован с https://thoughtbot.com/blog/send-a-patch-to-someone-using-git-format-patch

Как мы можем подавить это, что является просто git версией, сгенерировавшей файл патча?

--
2.7.0

1 Ответ

1 голос
/ 14 марта 2020

Используйте флаг git format-patch --no-signature:

       --[no-]signature=<signature>
           Add a signature to each message produced. Per RFC 3676 the signature is separated from the
           body by a line with '-- ' on it. If the signature option is omitted the signature defaults
           to the Git version number.
...