doc/git-show: include --diff-merges description
Move description of --diff-merges option from git-log.txt to diff-options.txt so that it is included in the git-show help. Signed-off-by: Sergey Organov <sorganov@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Sergey Organov committed
Dec 21, 2020 at 18:19 UTC
1d24509b7b865115836982267a5e54b2f7d77c42
3 files changed
+57
-52
Documentation/diff-options.txt
+51
@@ -33,6 +33,57 @@ endif::git-diff[]
33
show the patch by default, or to cancel the effect of `--patch`.
34
endif::git-format-patch[]
35
36
+ifdef::git-log[]
37
+--diff-merges=(off|none|first-parent|1|separate|m|combined|c|dense-combined|cc)::
38
+--no-diff-merges::
39
+ Specify diff format to be used for merge commits. Default is
40
+ {diff-merges-default} unless `--first-parent` is in use, in which case
41
+ `first-parent` is the default.
42
++
43
+--diff-merges=(off|none):::
44
+--no-diff-merges:::
45
+ Disable output of diffs for merge commits. Useful to override
46
+ implied value.
47
++
48
+--diff-merges=first-parent:::
49
+--diff-merges=1:::
50
+ This option makes merge commits show the full diff with
51
+ respect to the first parent only.
52
++
53
+--diff-merges=separate:::
54
+--diff-merges=m:::
55
+-m:::
56
+ This makes merge commits show the full diff with respect to
57
+ each of the parents. Separate log entry and diff is generated
58
+ for each parent. `-m` doesn't produce any output without `-p`.
59
++
60
+--diff-merges=combined:::
61
+--diff-merges=c:::
62
+-c:::
63
+ With this option, diff output for a merge commit shows the
64
+ differences from each of the parents to the merge result
65
+ simultaneously instead of showing pairwise diff between a
66
+ parent and the result one at a time. Furthermore, it lists
67
+ only files which were modified from all parents. `-c` implies
68
+ `-p`.
69
++
70
+--diff-merges=dense-combined:::
71
+--diff-merges=cc:::
72
+--cc:::
73
+ With this option the output produced by
74
+ `--diff-merges=combined` is further compressed by omitting
75
+ uninteresting hunks whose contents in the parents have only
76
+ two variants and the merge result picks one of them without
77
+ modification. `--cc` implies `-p`.
78
+
79
+--combined-all-paths::
80
+ This flag causes combined diffs (used for merge commits) to
81
+ list the name of the file from all parents. It thus only has
82
+ effect when `--diff-merges=[dense-]combined` is in use, and
83
+ is likely only useful if filename changes are detected (i.e.
84
+ when either rename or copy detection have been requested).
85
+endif::git-log[]
86
+
87
-U<n>::
88
--unified=<n>::
89
Generate diffs with <n> lines of context instead of
Documentation/git-log.txt
+1
-50
@@ -127,57 +127,8 @@ selected, nor will they match search options like `-S`. The exception
127
is when `--first-parent` is in use, in which case `first-parent` is
128
the default format.
129
130
---diff-merges=(off|none|first-parent|1|separate|m|combined|c|dense-combined|cc)::
131
---no-diff-merges::
132
- Specify diff format to be used for merge commits. Default is
133
- `off` unless `--first-parent` is in use, in which case
134
- `first-parent` is the default.
135
-+
136
---diff-merges=(off|none):::
137
---no-diff-merges:::
138
- Disable output of diffs for merge commits. Useful to override
139
- implied value.
140
-+
141
---diff-merges=first-parent:::
142
---diff-merges=1:::
143
- This option makes merge commits show the full diff with
144
- respect to the first parent only.
145
-+
146
---diff-merges=separate:::
147
---diff-merges=m:::
148
--m:::
149
- This makes merge commits show the full diff with respect to
150
- each of the parents. Separate log entry and diff is generated
151
- for each parent. `-m` doesn't produce any output without `-p`.
152
-+
153
---diff-merges=combined:::
154
---diff-merges=c:::
155
--c:::
156
- With this option, diff output for a merge commit shows the
157
- differences from each of the parents to the merge result
158
- simultaneously instead of showing pairwise diff between a
159
- parent and the result one at a time. Furthermore, it lists
160
- only files which were modified from all parents. `-c` implies
161
- `-p`.
162
-+
163
---diff-merges=dense-combined:::
164
---diff-merges=cc:::
165
---cc:::
166
- With this option the output produced by
167
- `--diff-merges=combined` is further compressed by omitting
168
- uninteresting hunks whose contents in the parents have only
169
- two variants and the merge result picks one of them without
170
- modification. `--cc` implies `-p`.
171
-
172
---combined-all-paths::
173
- This flag causes combined diffs (used for merge commits) to
174
- list the name of the file from all parents. It thus only has
175
- effect when `--diff-merges=[dense-]combined` is in use, and
176
- is likely only useful if filename changes are detected (i.e.
177
- when either rename or copy detection have been requested).
178
-
179
-
130
:git-log: 1
131
+:diff-merges-default: `off`
132
include::diff-options.txt[]
133
134
include::diff-generate-patch.txt[]
Documentation/git-show.txt
+5
-2
@@ -45,10 +45,13 @@ include::pretty-options.txt[]
45
include::pretty-formats.txt[]
46
47
48
-COMMON DIFF OPTIONS
49
--------------------
48
+DIFF FORMATTING
49
+---------------
50
+The options below can be used to change the way `git show` generates
51
+diff output.
52
53
:git-log: 1
54
+:diff-merges-default: `dense-combined`
55
include::diff-options.txt[]
56
57
include::diff-generate-patch.txt[]