当运行 git-am 应用我从邮件列表保存到 mbox 文件中的补丁系列时,如果 mbox 还包含求职信(也称为 PATCH [0/N]),它会抱怨如下:
128 git … am --3way ~/patches/sample.mbox
Patch is empty.
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
求职信确实是一个空补丁,因为其中没有补丁分隔符,但我认为git am
会足够聪明地注意到它并完全跳过它。这不是一个大麻烦,因为我可以跳过从 mutt 将此补丁添加到 mbox 中而不会遇到麻烦,但有时一个补丁系列到达邮件列表时有些混乱,我不能只是将整个线程复制到同一个 mbox 中。或者,我可以手动跳过补丁,它会顺利应用。
当它确实是求职信时,有什么方法可以指示 git am 跳过补丁号 0?