doc/git-log: describe new --diff-merges options
Describe all the new --diff-merges options in the git-log.txt and adopt description of originals accordingly. 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
b5ffa9ec10a3b82a1530d6f7628bd3ef9e8dd037
1 file changed
+52
-35
Documentation/git-log.txt
+52
-35
@@ -120,45 +120,62 @@ DIFF FORMATTING
120
By default, `git log` does not generate any diff output. The options
121
below can be used to show the changes made by each commit.
122
123
-Note that unless one of `-c`, `--cc`, or `-m` is given, merge commits
124
-will never show a diff, even if a diff format like `--patch` is
125
-selected, nor will they match search options like `-S`. The exception is
126
-when `--first-parent` is in use, in which merges are treated like normal
127
-single-parent commits (this can be overridden by providing a
128
-combined-diff option or with `--no-diff-merges`).
129
-
130
--c::
131
- With this option, diff output for a merge commit
132
- shows the differences from each of the parents to the merge result
133
- simultaneously instead of showing pairwise diff between a parent
134
- and the result one at a time. Furthermore, it lists only files
135
- which were modified from all parents.
136
-
137
---cc::
138
- This flag implies the `-c` option and further compresses the
139
- patch output by omitting uninteresting hunks whose contents in
140
- the parents have only two variants and the merge result picks
141
- one of them without modification.
123
+Note that unless one of `--diff-merges` variants (including short
124
+`-m`, `-c`, and `--cc` options) is explicitly given, merge commits
125
+will not show a diff, even if a diff format like `--patch` is
126
+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
146
- effect when -c or --cc are specified, and is likely only
147
- useful if filename changes are detected (i.e. when either
148
- rename or copy detection have been requested).
149
-
150
--m::
151
- This flag makes the merge commits show the full diff like
152
- regular commits; for each merge parent, a separate log entry
153
- and diff is generated. An exception is that only diff against
154
- the first parent is shown when `--first-parent` option is given;
155
- in that case, the output represents the changes the merge
156
- brought _into_ the then-current branch.
157
-
158
---diff-merges=off::
159
---no-diff-merges::
160
- Disable output of diffs for merge commits (default). Useful to
161
- override `-m`, `-c`, or `--cc`.
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
180
:git-log: 1
181
include::diff-options.txt[]