1
这里有两个文本文件进行比较:git的差异--word-DIFF给出错误的结果
的1.txt:
one three four five
2.txt:
one two three four
下面是命令创建diff(对于Windows):
git init
copy 1.txt temp
git add temp
copy 2.txt temp
git diff --minimal --word-diff
del temp
xrmdir /s /q ".git"
这里是输出:
diff --git a/temp b/temp
index 555f964..d993b66 100644
--- a/temp
+++ b/temp
@@ -1 +1 @@
one {+two+} three four[-five-]
如果我们想通过看DIFF看到原来的1.txt,我们会看到一个三,四,五之间没有空格之间
one three fourfive
(双空间)。
有没有办法(命令,我想)来解决这个问题,或者这是正常的?我错过了什么吗?
PS:GIT中--version == 1.8.3.mysysgit.0