diff-merges: improve --diff-merges documentation
* Put descriptions of convenience shortcuts first, so they are the first things reader observes rather than lengthy detailed stuff. * Get rid of very long line containing all the --diff-merges formats by replacing them with <format>, and putting each supported format on its own line. Signed-off-by: Sergey Organov <sorganov@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>maint
parent
3a06386e31
commit
be3820c60c
|
@ -37,66 +37,74 @@ endif::git-diff[]
|
||||||
endif::git-format-patch[]
|
endif::git-format-patch[]
|
||||||
|
|
||||||
ifdef::git-log[]
|
ifdef::git-log[]
|
||||||
--diff-merges=(off|none|on|first-parent|1|separate|m|combined|c|dense-combined|cc|remerge|r)::
|
-m::
|
||||||
|
Show diffs for merge commits in the default format. This is
|
||||||
|
similar to '--diff-merges=on', except `-m` will
|
||||||
|
produce no output unless `-p` is given as well.
|
||||||
|
|
||||||
|
-c::
|
||||||
|
Produce combined diff output for merge commits.
|
||||||
|
Shortcut for '--diff-merges=combined -p'.
|
||||||
|
|
||||||
|
--cc::
|
||||||
|
Produce dense combined diff output for merge commits.
|
||||||
|
Shortcut for '--diff-merges=dense-combined -p'.
|
||||||
|
|
||||||
|
--remerge-diff::
|
||||||
|
Produce remerge-diff output for merge commits.
|
||||||
|
Shortcut for '--diff-merges=remerge -p'.
|
||||||
|
|
||||||
--no-diff-merges::
|
--no-diff-merges::
|
||||||
|
Synonym for '--diff-merges=off'.
|
||||||
|
|
||||||
|
--diff-merges=<format>::
|
||||||
Specify diff format to be used for merge commits. Default is
|
Specify diff format to be used for merge commits. Default is
|
||||||
{diff-merges-default} unless `--first-parent` is in use, in which case
|
{diff-merges-default} unless `--first-parent` is in use, in
|
||||||
`first-parent` is the default.
|
which case `first-parent` is the default.
|
||||||
+
|
+
|
||||||
--diff-merges=(off|none):::
|
The following formats are supported:
|
||||||
--no-diff-merges:::
|
+
|
||||||
|
--
|
||||||
|
off, none::
|
||||||
Disable output of diffs for merge commits. Useful to override
|
Disable output of diffs for merge commits. Useful to override
|
||||||
implied value.
|
implied value.
|
||||||
+
|
+
|
||||||
--diff-merges=on:::
|
on, m::
|
||||||
--diff-merges=m:::
|
Make diff output for merge commits to be shown in the default
|
||||||
-m:::
|
format. The default format could be changed using
|
||||||
This option makes diff output for merge commits to be shown in
|
`log.diffMerges` configuration variable, whose default value
|
||||||
the default format. `-m` will produce the output only if `-p`
|
|
||||||
is given as well. The default format could be changed using
|
|
||||||
`log.diffMerges` configuration parameter, which default value
|
|
||||||
is `separate`.
|
is `separate`.
|
||||||
+
|
+
|
||||||
--diff-merges=first-parent:::
|
first-parent, 1::
|
||||||
--diff-merges=1:::
|
Show full diff with respect to first parent. This is the same
|
||||||
This option makes merge commits show the full diff with
|
format as `--patch` produces for non-merge commits.
|
||||||
respect to the first parent only.
|
|
||||||
+
|
+
|
||||||
--diff-merges=separate:::
|
separate::
|
||||||
This makes merge commits show the full diff with respect to
|
Show full diff with respect to each of parents.
|
||||||
each of the parents. Separate log entry and diff is generated
|
Separate log entry and diff is generated for each parent.
|
||||||
for each parent.
|
|
||||||
+
|
+
|
||||||
--diff-merges=remerge:::
|
combined, c::
|
||||||
--diff-merges=r:::
|
Show differences from each of the parents to the merge
|
||||||
--remerge-diff:::
|
result simultaneously instead of showing pairwise diff between
|
||||||
With this option, two-parent merge commits are remerged to
|
a parent and the result one at a time. Furthermore, it lists
|
||||||
create a temporary tree object -- potentially containing files
|
only files which were modified from all parents.
|
||||||
with conflict markers and such. A diff is then shown between
|
+
|
||||||
that temporary tree and the actual merge commit.
|
dense-combined, cc::
|
||||||
|
Further compress output produced by `--diff-merges=combined`
|
||||||
|
by omitting uninteresting hunks whose contents in the parents
|
||||||
|
have only two variants and the merge result picks one of them
|
||||||
|
without modification.
|
||||||
|
+
|
||||||
|
remerge, r::
|
||||||
|
Remerge two-parent merge commits to create a temporary tree
|
||||||
|
object--potentially containing files with conflict markers
|
||||||
|
and such. A diff is then shown between that temporary tree
|
||||||
|
and the actual merge commit.
|
||||||
+
|
+
|
||||||
The output emitted when this option is used is subject to change, and
|
The output emitted when this option is used is subject to change, and
|
||||||
so is its interaction with other options (unless explicitly
|
so is its interaction with other options (unless explicitly
|
||||||
documented).
|
documented).
|
||||||
+
|
--
|
||||||
--diff-merges=combined:::
|
|
||||||
--diff-merges=c:::
|
|
||||||
-c:::
|
|
||||||
With this option, diff output for a merge commit shows the
|
|
||||||
differences from each of the parents to the merge result
|
|
||||||
simultaneously instead of showing pairwise diff between a
|
|
||||||
parent and the result one at a time. Furthermore, it lists
|
|
||||||
only files which were modified from all parents. `-c` implies
|
|
||||||
`-p`.
|
|
||||||
+
|
|
||||||
--diff-merges=dense-combined:::
|
|
||||||
--diff-merges=cc:::
|
|
||||||
--cc:::
|
|
||||||
With this option the output produced by
|
|
||||||
`--diff-merges=combined` is further compressed by omitting
|
|
||||||
uninteresting hunks whose contents in the parents have only
|
|
||||||
two variants and the merge result picks one of them without
|
|
||||||
modification. `--cc` implies `-p`.
|
|
||||||
|
|
||||||
--combined-all-paths::
|
--combined-all-paths::
|
||||||
This flag causes combined diffs (used for merge commits) to
|
This flag causes combined diffs (used for merge commits) to
|
||||||
|
|
|
@ -124,7 +124,7 @@ Note that unless one of `--diff-merges` variants (including short
|
||||||
will not show a diff, even if a diff format like `--patch` is
|
will not show a diff, even if a diff format like `--patch` is
|
||||||
selected, nor will they match search options like `-S`. The exception
|
selected, nor will they match search options like `-S`. The exception
|
||||||
is when `--first-parent` is in use, in which case `first-parent` is
|
is when `--first-parent` is in use, in which case `first-parent` is
|
||||||
the default format.
|
the default format for merge commits.
|
||||||
|
|
||||||
:git-log: 1
|
:git-log: 1
|
||||||
:diff-merges-default: `off`
|
:diff-merges-default: `off`
|
||||||
|
|
Loading…
Reference in New Issue