Browse Source

Doc update for context diff support

Matthew Wang 11 years ago
parent
commit
18985c1ca2
1 changed files with 9 additions and 5 deletions
  1. 9
    5
      README.rst

+ 9
- 5
README.rst View File

107
     svn diff -r1234 | cdiff -s  # view svn diff comparing to given revision
107
     svn diff -r1234 | cdiff -s  # view svn diff comparing to given revision
108
     diff -u file1 file2 | cdiff # view diff between two files (note the '-u')
108
     diff -u file1 file2 | cdiff # view diff between two files (note the '-u')
109
     diff -ur dir1 dir2 | cdiff  # view diff between two dirs
109
     diff -ur dir1 dir2 | cdiff  # view diff between two dirs
110
-    cat foo.patch | cdiff       # view a unified patch (or cdiff < foo.path)
111
 
110
 
112
-    # View a GitHub pull request, side by side (GitHub web interface is missing
113
-    # this feature :)
114
-    #
111
+    # View diff in a GitHub pull request, side by side
115
     curl https://github.com/ymattw/cdiff/pull/11.diff | cdiff -s
112
     curl https://github.com/ymattw/cdiff/pull/11.diff | cdiff -s
116
 
113
 
114
+    # View a patch file in unified or context format, the latter depends on
115
+    # command `filterdiff` from package `patchutils` which is available in
116
+    # major Linux distros and MacPorts.  "cdiff < foo.path" works too.
117
+    #
118
+    cat foo.patch | cdiff 
119
+
117
 Redirect output to another patch file is safe:
120
 Redirect output to another patch file is safe:
118
 
121
 
119
 .. code:: sh
122
 .. code:: sh
125
 
128
 
126
 Cdiff has following known issues:
129
 Cdiff has following known issues:
127
 
130
 
128
-- Only takes unified diff for input
131
+- Does not recognize `normal` diff, and depends on ``filterdiff`` (patchutils)
132
+  to read `context` diff
129
 - Side by side mode has alignment problem for wide chars
133
 - Side by side mode has alignment problem for wide chars
130
 - Terminal might be in a mess on exception (type ``reset`` can fix it)
134
 - Terminal might be in a mess on exception (type ``reset`` can fix it)
131
 
135