Why doesn't `git log -m` imply `-p`?
- From
Alex Henrie <alexhenrie24@gmail.com>
- Date
- Apr 29, 2021, 01:44 UTC
- Message-ID
- <CAMMLpeR-W35Qq6a343ifrxJ=mwBc_VcXZtVrBYDpJTySNBroFw@mail.gmail.com>
I read the following in `man git-log` today:
--diff-merges=separate, --diff-merges=m, -m
This makes merge commits show the full diff with respect to each of
the parents. Separate log entry and diff is generated for each
parent. -m doesn't produce any output without -p.--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.Why do -c and -cc imply -p, but -m does not? I tried to use both `git log -c` and `git log -m` today and was confused when the latter didn't produce any output. Could we change this behavior in a future version of Git?
-Alex