浏览代码

More example to illustrate command options

Matthew Wang 11 年前
父节点
当前提交
f0b2f43ad8
共有 1 个文件被更改,包括 7 次插入0 次删除
  1. 7
    0
      README.rst

+ 7
- 0
README.rst 查看文件

@@ -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: