Browse Source

More example to illustrate command options

Matthew Wang 11 years ago
parent
commit
f0b2f43ad8
1 changed files with 7 additions and 0 deletions
  1. 7
    0
      README.rst

+ 7
- 0
README.rst View File

@@ -73,6 +73,10 @@ Type ``cdiff -h`` to show usage::
73 73
       -l, --log           show log with changes from revision control
74 74
       -c M, --color=M     colorize mode 'auto' (default), 'always', or 'never'
75 75
 
76
+      Note:
77
+        Option parser will stop on first unknown option and pass them down to
78
+        underneath revision control
79
+
76 80
 Read diff from local modification in a *Git/Mercurial/Svn* workspace (output
77 81
 from e.g. ``git diff``, ``svn diff``):
78 82
 
@@ -84,6 +88,9 @@ from e.g. ``git diff``, ``svn diff``):
84 88
     cdiff -s -w 90              # use text width 90 other than default 80
85 89
     cdiff -s file1 dir2         # view modification of given files/dirs only
86 90
     cdiff -s -w90 -- -U10       # pass '-U10' to underneath revision diff tool
91
+    cdiff -s -w90 -U10          # '--' is optional as it's unknown to cdiff
92
+    cdiff -s --cached           # show git staged diff (git diff --cached)
93
+    cdiff -s -r1234             # show svn diff to revision 1234
87 94
 
88 95
 Read log with changes in a *Git/Mercurial/Svn* workspace (output from e.g.
89 96
 ``git log -p``, ``svn log --diff``), note *--diff* option is new in svn 1.7.0: