git - git format-patch 输出的第一行是什么?

标签 git format-patch

当运行 git format-patch 时,目的是为您编写的代码创建一个电子邮件表示。到目前为止,一切都很好。我不是电子邮件专家,但在我看来,此格式补丁输出的第一行不是标准的电子邮件 header 格式...

From de8d128fb520416e0b029c913b3a5ce900d0320c Mon Sep 17 00:00:00 2001
Message-Id: 
From: Christopher Harvey 
Date: Wed, 3 Apr 2013 10:17:52 -0400
Subject: [PATCH 0/3] *** SUBJECT HERE ***
To: Christopher Harvey 

*** BLURB HERE ***

Christopher Harvey (3):
  commit 2
  commit 3
  commit 4

 data | 3 +++
 1 file changed, 3 insertions(+)

-- 
1.7.12.4

什么是 From de8d128fb520416e0b029c913b3a5ce900d0320c Mon Sep 17 00:00:00 2001?什么是日期?它对我来说看起来很随意,而且它还阻止我将它通过管道发送到 sendmail。每次我想发送补丁时,我都必须手动删除该行。

谢谢。

最佳答案

来自 git help format-patch

DISCUSSION The patch produced by git format-patch is in UNIX mailbox format, with a fixed "magic" time stamp to indicate that the file is output from format-patch rather than a real mailbox, like so:

       From 8f72bad1baf19a53459661343e21d6491c3908d3 Mon Sep 17 00:00:00 2001
       From: Tony Luck <tony.luck@intel.com>
       Date: Tue, 13 Jul 2010 11:42:54 -0700
       Subject: [PATCH] =?UTF-8?q?> > [IA64]=20Put=20ia64=20config=20files=20on=20the=20?=
        =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig=20diet?=
       MIME-Version: 1.0
       Content-Type: text/plain; charset=UTF-8
       Content-Transfer-Encoding: 8bit

关于git - git format-patch 输出的第一行是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15790120/

相关文章:

git - 如何为特定提交生成 Git 补丁?

git - 如何对大量提交进行 rebase

仅当所有测试通过时 Git 主存储库更新,怎么办?

git - Git 可以处理这种用例吗?

git - 如何为标记的提交创建一个单独的分支?

git - 如何通过 Anaconda 命令提示符更新 Git 版本?

git am 正在从我的提交消息中阻塞字符

git - 在 Git 中 merge 后如何重新格式化补丁?