在运行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个补丁时跳过它?