doc: git-log: convert diff options to new doc format

- Use `backticks` for keywords and more complex option descriptions. The new rendering engine will apply synopsis rules to these spans. - In description lists, put each option on its own line, to make them more searchable and enable automatic translation of the options. Signed-off-by: Jean-Noël Avila <jn.avila@free.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Jean-Noël Avila committed Jul 7, 2025 at 18:53 UTC 0b4ccb2199efedce3f8de33a1da46bab59f5da35
1 file changed +23 -17
Documentation/diff-options.adoc
+23 -17
@@ -37,32 +37,32 @@ endif::git-diff[]
37 endif::git-format-patch[]
38
39 ifdef::git-log[]
40 --m::
40 +`-m`::
41 Show diffs for merge commits in the default format. This is
42 similar to `--diff-merges=on`, except `-m` will
43 produce no output unless `-p` is given as well.
44
45 --c::
45 +`-c`::
46 Produce combined diff output for merge commits.
47 Shortcut for `--diff-merges=combined -p`.
48
49 ---cc::
49 +`--cc`::
50 Produce dense combined diff output for merge commits.
51 Shortcut for `--diff-merges=dense-combined -p`.
52
53 ---dd::
53 +`--dd`::
54 Produce diff with respect to first parent for both merge and
55 regular commits.
56 Shortcut for `--diff-merges=first-parent -p`.
57
58 ---remerge-diff::
58 +`--remerge-diff`::
59 Produce remerge-diff output for merge commits.
60 Shortcut for `--diff-merges=remerge -p`.
61
62 ---no-diff-merges::
62 +`--no-diff-merges`::
63 Synonym for `--diff-merges=off`.
64
65 ---diff-merges=<format>::
65 +`--diff-merges=<format>`::
66 Specify diff format to be used for merge commits. Default is
67 {diff-merges-default} unless `--first-parent` is in use, in
68 which case `first-parent` is the default.
@@ -70,48 +70,54 @@ ifdef::git-log[]
70 The following formats are supported:
71 +
72 --
73 -off, none::
73 +`off`::
74 +`none`::
75 Disable output of diffs for merge commits. Useful to override
76 implied value.
77
77 -on, m::
78 +`on`::
79 +`m`::
80 Make diff output for merge commits to be shown in the default
81 format. The default format can be changed using
82 `log.diffMerges` configuration variable, whose default value
83 is `separate`.
84
83 -first-parent, 1::
85 +`first-parent`::
86 +`1`::
87 Show full diff with respect to first parent. This is the same
88 format as `--patch` produces for non-merge commits.
89
87 -separate::
90 +`separate`::
91 Show full diff with respect to each of parents.
92 Separate log entry and diff is generated for each parent.
93
91 -combined, c::
94 +`combined`::
95 +`c`::
96 Show differences from each of the parents to the merge
97 result simultaneously instead of showing pairwise diff between
98 a parent and the result one at a time. Furthermore, it lists
99 only files which were modified from all parents.
100
97 -dense-combined, cc::
101 +`dense-combined`::
102 +`cc`::
103 Further compress output produced by `--diff-merges=combined`
104 by omitting uninteresting hunks whose contents in the parents
105 have only two variants and the merge result picks one of them
106 without modification.
107
103 -remerge, r::
104 - Remerge two-parent merge commits to create a temporary tree
108 +`remerge`::
109 +`r`:: Remerge two-parent merge commits to create a temporary tree
110 object--potentially containing files with conflict markers
111 and such. A diff is then shown between that temporary tree
112 and the actual merge commit.
113 +--
114 +
115 The output emitted when this option is used is subject to change, and
116 so is its interaction with other options (unless explicitly
117 documented).
112 ---
118
114 ---combined-all-paths::
119 +
120 +`--combined-all-paths`::
121 Cause combined diffs (used for merge commits) to
122 list the name of the file from all parents. It thus only has
123 effect when `--diff-merges=[dense-]combined` is in use, and