Show More
@@ -547,6 +547,9 b' related options for the annotate command' | |||||
547 | ``nodates`` |
|
547 | ``nodates`` | |
548 | Don't include dates in diff headers. |
|
548 | Don't include dates in diff headers. | |
549 |
|
549 | |||
|
550 | ``noprefix`` | |||
|
551 | Omit 'a/' and 'b/' prefixes from filenames. Ignored in plain mode. | |||
|
552 | ||||
550 | ``showfunc`` |
|
553 | ``showfunc`` | |
551 | Show which function each change is in. |
|
554 | Show which function each change is in. | |
552 |
|
555 |
@@ -1573,6 +1573,7 b' def diffopts(ui, opts=None, untrusted=Fa' | |||||
1573 | git=get('git'), |
|
1573 | git=get('git'), | |
1574 | nodates=get('nodates'), |
|
1574 | nodates=get('nodates'), | |
1575 | nobinary=get('nobinary'), |
|
1575 | nobinary=get('nobinary'), | |
|
1576 | noprefix=get('noprefix', forceplain=False), | |||
1576 | showfunc=get('show_function', 'showfunc'), |
|
1577 | showfunc=get('show_function', 'showfunc'), | |
1577 | ignorews=get('ignore_all_space', 'ignorews'), |
|
1578 | ignorews=get('ignore_all_space', 'ignorews'), | |
1578 | ignorewsamount=get('ignore_space_change', 'ignorewsamount'), |
|
1579 | ignorewsamount=get('ignore_space_change', 'ignorewsamount'), |
@@ -89,6 +89,38 b' invalid diff.unified' | |||||
89 | abort: diff context lines count must be an integer, not 'foo' |
|
89 | abort: diff context lines count must be an integer, not 'foo' | |
90 | [255] |
|
90 | [255] | |
91 |
|
91 | |||
|
92 | noprefix config | |||
|
93 | ||||
|
94 | $ hg --config diff.noprefix=True diff --nodates | |||
|
95 | diff -r cf9f4ba66af2 a | |||
|
96 | --- a/a | |||
|
97 | +++ b/a | |||
|
98 | @@ -2,7 +2,7 @@ | |||
|
99 | c | |||
|
100 | a | |||
|
101 | a | |||
|
102 | -b | |||
|
103 | +dd | |||
|
104 | a | |||
|
105 | a | |||
|
106 | c | |||
|
107 | ||||
|
108 | noprefix disabled in plain mode | |||
|
109 | ||||
|
110 | $ HGPLAIN=1 hg --config diff.noprefix=True diff --nodates | |||
|
111 | diff -r cf9f4ba66af2 a | |||
|
112 | --- a/a | |||
|
113 | +++ b/a | |||
|
114 | @@ -2,7 +2,7 @@ | |||
|
115 | c | |||
|
116 | a | |||
|
117 | a | |||
|
118 | -b | |||
|
119 | +dd | |||
|
120 | a | |||
|
121 | a | |||
|
122 | c | |||
|
123 | ||||
92 |
$ |
|
124 | $ cd .. | |
93 |
|
125 | |||
94 |
|
126 | |||
@@ -171,6 +203,30 b' Git diff, adding space' | |||||
171 | -a |
|
203 | -a | |
172 | +b |
|
204 | +b | |
173 |
|
205 | |||
|
206 | Git diff with noprefix | |||
|
207 | ||||
|
208 | $ hg --config diff.noprefix=True diff --git --nodates | |||
|
209 | diff --git a/f1 b/f 1 | |||
|
210 | rename from f1 | |||
|
211 | rename to f 1 | |||
|
212 | --- a/f1 | |||
|
213 | +++ b/f 1 | |||
|
214 | @@ -1,1 +1,1 @@ | |||
|
215 | -a | |||
|
216 | +b | |||
|
217 | ||||
|
218 | noprefix config disabled in plain mode | |||
|
219 | ||||
|
220 | $ HGPLAIN=1 hg --config diff.noprefix=True diff --git --nodates | |||
|
221 | diff --git a/f1 b/f 1 | |||
|
222 | rename from f1 | |||
|
223 | rename to f 1 | |||
|
224 | --- a/f1 | |||
|
225 | +++ b/f 1 | |||
|
226 | @@ -1,1 +1,1 @@ | |||
|
227 | -a | |||
|
228 | +b | |||
|
229 | ||||
174 | Regular diff --nodates, file deletion |
|
230 | Regular diff --nodates, file deletion | |
175 |
|
231 | |||
176 | $ hg ci -m addspace |
|
232 | $ hg ci -m addspace |
General Comments 0
You need to be logged in to leave comments.
Login now