从Thunderbird应用git系列补丁最简单的方法是什么? [英] What is the easiest way to apply git series of patches from Thunderbird

查看:236
本文介绍了从Thunderbird应用git系列补丁最简单的方法是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个带有N个附件的邮件,格式为000X-xxxx.patch。我想将所有补丁应用到我的主人之上,但我希望将所有提交分开,就像原始作者提交它们一样。方法1:打开电子邮件,点击另存为xxx.eml,然后:
$ b $


$ b

  git am xxx.eml 

结果是好吧,但一切都被压缩到一个提交。方法2.所有的附件都保存在一个目录中,然后:

   git am 000 * .patch 
修补程序格式检测失败。
git apply 000 * .patch
(什么都不做)

这不是加工。建议? 就像提交消息是由Subject:行和消息体构成的,这意味着你不能重新创建原始提交序列(也就是说,没有办法来恢复作者的提交消息用于每个单独的提交)...虽然根据手册页, git am 是用于内联补丁,而不是作为附件包含的补丁,所以我很惊讶即使在方法1中它也是正确的。



如果您愿意放弃提交消息,您应该能够将补丁保存到单个文件中, code> git apply ... 按顺序排列。


I have a mail with N attachments in the 000X-xxxx.patch format. I would like to apply all the patches on top of my master, but I would like to have all the commits separate, as the original author commited them. Including the commit message of course.

Method 1: Open the email, click Save as, xxx.eml and then:

git am xxx.eml

The result is ok, but everything is squashed into one commit. Not acceptable.

Method 2. All the attachments are saved in a directory, then:

git am 000*.patch
Patch format detection failed.
git apply 000*.patch
(does nothing)

This is not working. Advices? Thanks.

解决方案

Reading through the git am man page, it looks like the commit message is formed from the Subject: line and the message body, which means that you're not going to be able to recreate the original sequence of commits (that is, there's no means by which to recover the commit message the author used for each individual commit)...although according to the man page, git am is meant to work with inline patches, not patches included as attachments, so I'm surprised it's doing the right thing even in method 1.

If you're willing to discard the commit messages, you should be able to save the patches to individual files and just git apply ... them in sequence.

这篇关于从Thunderbird应用git系列补丁最简单的方法是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆