Skip to content

Commit 1d24509

Browse files
sorganovgitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent e58142a commit 1d24509

File tree

3 files changed

+57
-52
lines changed

3 files changed

+57
-52
lines changed

Documentation/diff-options.txt

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,57 @@ endif::git-diff[]
3333
show the patch by default, or to cancel the effect of `--patch`.
3434
endif::git-format-patch[]
3535

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+
3687
-U<n>::
3788
--unified=<n>::
3889
Generate diffs with <n> lines of context instead of

Documentation/git-log.txt

Lines changed: 1 addition & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -127,57 +127,8 @@ selected, nor will they match search options like `-S`. The exception
127127
is when `--first-parent` is in use, in which case `first-parent` is
128128
the default format.
129129

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-
180130
:git-log: 1
131+
:diff-merges-default: `off`
181132
include::diff-options.txt[]
182133

183134
include::diff-generate-patch.txt[]

Documentation/git-show.txt

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,13 @@ include::pretty-options.txt[]
4545
include::pretty-formats.txt[]
4646

4747

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.
5052

5153
:git-log: 1
54+
:diff-merges-default: `dense-combined`
5255
include::diff-options.txt[]
5356

5457
include::diff-generate-patch.txt[]

0 commit comments

Comments
 (0)