好吧,我已经尝试了所有可以在stackoverflow上找到的答案,但显然没有人能够解决我的问题。我想将由SVN制作的补丁应用到git存储库。显然,最简单的方法是使用'git apply',但这似乎不起作用。将svn补丁应用到git存储库
$ git apply --ignore-space-change --ignore-whitespace < xxx_parser.patch
<stdin>:10: trailing whitespace.
FORCE_LA_CHECK = false; stdin:23: trailing whitespace.
<stdin>:79: trailing whitespace
.
.
.
.
error: pmd/grammar/JspParser.jjt: No such file or directory
error: patch failed: pmd/pom.xml:251
error: pmd/pom.xml: patch does not apply
这是xxx_parser.patch的内容:
$ head xxx_parser.patch Index: etc/grammar/JspParser.jjt
--- etc/grammar/JspParser.jjt (revision 7704)
+++ etc/grammar/JspParser.jjt (working copy)
现在为什么它抱怨说,它无法找到文件PMD /语法/ JspParser.jjt?
修补程序中的路径指向正确的目录。
您知道补丁文件可以对多个文件进行更改吗?只需查看文件头就可以看到补丁中的第一个文件。 – asm 2012-07-17 11:41:17