diff options
author | Denton Liu <liu.denton@gmail.com> | 2020-09-14 11:36:52 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-09-21 13:37:03 -0700 |
commit | 3d09c22869a7bd47f1683031937af0ed93b2fa3b (patch) | |
tree | 045ced9ffc692b665a5eec38611e9f75755399e4 /Documentation/git-diff-tree.txt | |
parent | builtin/diff-index: learn --merge-base (diff) | |
download | tgif-3d09c22869a7bd47f1683031937af0ed93b2fa3b.tar.xz |
builtin/diff-tree: learn --merge-base
The previous commit introduced ---merge-base a way to take the diff
between the working tree or index and the merge base between an arbitrary
commit and HEAD. It makes sense to extend this option to support the
case where two commits are given too and behave in a manner identical to
`git diff A...B`.
Introduce the --merge-base flag as an alternative to triple-dot
notation. Thus, we would be able to write the above as
`git diff --merge-base A B`.
Signed-off-by: Denton Liu <liu.denton@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/git-diff-tree.txt')
-rw-r--r-- | Documentation/git-diff-tree.txt | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Documentation/git-diff-tree.txt b/Documentation/git-diff-tree.txt index 5c8a2a5e97..2fc24c542f 100644 --- a/Documentation/git-diff-tree.txt +++ b/Documentation/git-diff-tree.txt @@ -10,7 +10,7 @@ SYNOPSIS -------- [verse] 'git diff-tree' [--stdin] [-m] [-s] [-v] [--no-commit-id] [--pretty] - [-t] [-r] [-c | --cc] [--combined-all-paths] [--root] + [-t] [-r] [-c | --cc] [--combined-all-paths] [--root] [--merge-base] [<common diff options>] <tree-ish> [<tree-ish>] [<path>...] DESCRIPTION @@ -43,6 +43,11 @@ include::diff-options.txt[] When `--root` is specified the initial commit will be shown as a big creation event. This is equivalent to a diff against the NULL tree. +--merge-base:: + Instead of comparing the <tree-ish>s directly, use the merge + base between the two <tree-ish>s as the "before" side. There + must be two <tree-ish>s given and they must both be commits. + --stdin:: When `--stdin` is specified, the command does not take <tree-ish> arguments from the command line. Instead, it |