diff options
author | Junio C Hamano <gitster@pobox.com> | 2020-08-17 17:37:23 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-08-17 17:37:23 -0700 |
commit | 255163d69c70539d1da70a4c63ea5338d8018484 (patch) | |
tree | f1e3319eea5e1b06a30e14911697fd6973231feb /git-log.txt | |
parent | 98c882d1c4c1d32487bb11a3ba40f66f34b764e4 (diff) | |
download | git-htmldocs-255163d69c70539d1da70a4c63ea5338d8018484.tar.gz |
Autogenerated HTML docs for v2.28.0-258-g2befe9
Diffstat (limited to 'git-log.txt')
-rw-r--r-- | git-log.txt | 47 |
1 files changed, 45 insertions, 2 deletions
diff --git a/git-log.txt b/git-log.txt index 3fd26d521..2b8ac5ff8 100644 --- a/git-log.txt +++ b/git-log.txt @@ -114,8 +114,51 @@ include::rev-list-options.txt[] include::pretty-formats.txt[] -COMMON DIFF OPTIONS -------------------- +DIFF FORMATTING +--------------- + +By default, `git log` does not generate any diff output. The options +below can be used to show the changes made by each commit. + +Note that unless one of `-c`, `--cc`, or `-m` is given, merge commits +will never show a diff, even if a diff format like `--patch` is +selected, nor will they match search options like `-S`. The exception is +when `--first-parent` is in use, in which merges are treated like normal +single-parent commits (this can be overridden by providing a +combined-diff option or with `--no-diff-merges`). + +-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. + +--cc:: + This flag implies the `-c` option and further compresses the + patch output by omitting uninteresting hunks whose contents in + the parents have only two variants and the merge result picks + one of them without modification. + +--combined-all-paths:: + This flag causes combined diffs (used for merge commits) to + list the name of the file from all parents. It thus only has + effect when -c or --cc are specified, and is likely only + useful if filename changes are detected (i.e. when either + rename or copy detection have been requested). + +-m:: + This flag makes the merge commits show the full diff like + regular commits; for each merge parent, a separate log entry + and diff is generated. An exception is that only diff against + the first parent is shown when `--first-parent` option is given; + in that case, the output represents the changes the merge + brought _into_ the then-current branch. + +--diff-merges=off:: +--no-diff-merges:: + Disable output of diffs for merge commits (default). Useful to + override `-m`, `-c`, or `--cc`. :git-log: 1 include::diff-options.txt[] |