我很愚蠢,没有google fu.你如何得到差异(在os x上,如果它重要......)看起来像svn差异?也无法从手册页中找到它.:(
我想要的是
Index: test.txt
===================================================================
--- test.txt (revision 365)
+++ test.txt (working copy)
@@ -1,7 +1,9 @@
This
is
the
-original
+updated
+and
+awesomer
file.
-Unf.
+Duh.
Run Code Online (Sandbox Code Playgroud)
Car*_*rum 27
你想要-u标志.
diff -u file1 file2
Run Code Online (Sandbox Code Playgroud)
从diff
手册页:
-u -U NUM --unified[=NUM]
Output NUM (default 3) lines of unified context.
Run Code Online (Sandbox Code Playgroud)
它不完全相同(例如,没有大排等号),但它应该做你想要的.你上面的例子:
--- file1 2009-10-16 15:14:24.000000000 -0700
+++ file2 2009-10-16 15:14:50.000000000 -0700
@@ -1,7 +1,9 @@
This
is
the
-original
+updated
+and
+awesomer
file.
-Unf.
+Duh.
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
5183 次 |
最近记录: |