这是
然而,将此diff输入
diff -u "temp temp/docs 1.txt" "temp temp/docs 2.txt"
的输出结果:--- temp temp/docs 1.txt Mon Apr 7 16:15:08 2014
+++ temp temp/docs 2.txt Mon Apr 7 16:18:45 2014
@@ -2,6 +2,6 @@
22
333
4444
-555555
+55555
666666
7777777
然而,将此diff输入
patch -u
失败,显示以下信息:can't find file to patch at input line 3
Perhaps you should have used the -p or --strip option?
The text leading up to this was:
--------------------------
|--- temp temp/docs 1.txt Mon Apr 7 16:15:08 2014
|+++ temp temp/docs 2.txt Mon Apr 7 16:18:45 2014
--------------------------
显然,空格是问题所在;是否有办法让 patch
在文件名中含有空格的情况下正常工作?
git diff
和git apply
呢? - user456814diff
和patch
。 - Joker_vD