diff options
| author | Junio C Hamano <gitster@pobox.com> | 2022-10-25 17:11:43 -0700 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2022-10-25 17:11:43 -0700 |
| commit | b988427918c767fc7782a387c9c8de9e147b983d (patch) | |
| tree | 4828e30bcbaae1c5c683bea9506c08a55911c6ff /Documentation | |
| parent | 1fc3c0ad407008c2f71dd9ae1241d8b75f8ef886 (diff) | |
| parent | a79c6b60817c74534815bf132f0b26aa8e325874 (diff) | |
| download | git-b988427918c767fc7782a387c9c8de9e147b983d.tar.xz | |
Merge branch 'rs/diff-caret-bang-with-parents'
"git diff rev^!" did not show combined diff to go to the rev from
its parents.
* rs/diff-caret-bang-with-parents:
diff: support ^! for merges
revisions.txt: unspecify order of resolved parts of ^!
revision: use strtol_i() for exclude_parent
Diffstat (limited to 'Documentation')
| -rw-r--r-- | Documentation/git-diff.txt | 8 | ||||
| -rw-r--r-- | Documentation/revisions.txt | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/Documentation/git-diff.txt b/Documentation/git-diff.txt index 85ae6d6d08..52b679256c 100644 --- a/Documentation/git-diff.txt +++ b/Documentation/git-diff.txt @@ -79,10 +79,10 @@ If --merge-base is given, use the merge base of the two commits for the This form is to view the results of a merge commit. The first listed <commit> must be the merge itself; the remaining two or - more commits should be its parents. A convenient way to produce - the desired set of revisions is to use the `^@` suffix. - For instance, if `master` names a merge commit, `git diff master - master^@` gives the same combined diff as `git show master`. + more commits should be its parents. Convenient ways to produce + the desired set of revisions are to use the suffixes `^@` and + `^!`. If A is a merge commit, then `git diff A A^@`, + `git diff A^!` and `git show A` all give the same combined diff. 'git diff' [<options>] <commit>..<commit> [--] [<path>...]:: diff --git a/Documentation/revisions.txt b/Documentation/revisions.txt index e3e350126d..0d2e55d781 100644 --- a/Documentation/revisions.txt +++ b/Documentation/revisions.txt @@ -363,7 +363,7 @@ Revision Range Summary '<rev>{caret}!', e.g. 'HEAD{caret}!':: A suffix '{caret}' followed by an exclamation mark is the same - as giving commit '<rev>' and then all its parents prefixed with + as giving commit '<rev>' and all its parents prefixed with '{caret}' to exclude them (and their ancestors). '<rev>{caret}-<n>', e.g. 'HEAD{caret}-, HEAD{caret}-2':: |
