diff options
author | Junio C Hamano <gitster@pobox.com> | 2020-10-27 15:09:50 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2020-10-27 15:09:51 -0700 |
commit | f3cfeb3078ce4af0ac764515795f7e0849a88931 (patch) | |
tree | 2c50c6975c647cfe709b5051a14145a93ae9726d /Documentation/git-checkout.txt | |
parent | 40696c67274305d6258539de5a36649cf833f712 (diff) | |
parent | 35166b1fb54d6c3ca0d9150fd766598a2d3d17b2 (diff) | |
download | git-f3cfeb3078ce4af0ac764515795f7e0849a88931.tar.gz |
Merge branch 'dl/checkout-p-merge-base'
"git checkout -p A...B [-- <path>]" did not work, even though the
same command without "-p" correctly used the merge-base between
commits A and B.
* dl/checkout-p-merge-base:
t2016: add a NEEDSWORK about the PERL prerequisite
add-patch: add NEEDSWORK about comparing commits
Doc: document "A...B" form for <tree-ish> in checkout and switch
builtin/checkout: fix `git checkout -p HEAD...` bug
Diffstat (limited to 'Documentation/git-checkout.txt')
-rw-r--r-- | Documentation/git-checkout.txt | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Documentation/git-checkout.txt b/Documentation/git-checkout.txt index afa5c11fd3..6ae8bf8dee 100644 --- a/Documentation/git-checkout.txt +++ b/Documentation/git-checkout.txt @@ -351,6 +351,10 @@ leave out at most one of `A` and `B`, in which case it defaults to `HEAD`. <tree-ish>:: Tree to checkout from (when paths are given). If not specified, the index will be used. ++ +As a special case, you may use `"A...B"` as a shortcut for the +merge base of `A` and `B` if there is exactly one merge base. You can +leave out at most one of `A` and `B`, in which case it defaults to `HEAD`. \--:: Do not interpret any more arguments as options. |