summaryrefslogtreecommitdiff
path: root/Documentation
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2020-10-27 15:09:50 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2020-10-27 15:09:51 -0700
commitf3cfeb3078ce4af0ac764515795f7e0849a88931 (patch)
tree2c50c6975c647cfe709b5051a14145a93ae9726d /Documentation
parentMerge branch 'sb/clone-origin' (diff)
parentt2016: add a NEEDSWORK about the PERL prerequisite (diff)
downloadtgif-f3cfeb3078ce4af0ac764515795f7e0849a88931.tar.xz
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')
-rw-r--r--Documentation/git-checkout.txt4
-rw-r--r--Documentation/git-restore.txt4
2 files changed, 8 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.
diff --git a/Documentation/git-restore.txt b/Documentation/git-restore.txt
index 84c6c40010..55bde91ef9 100644
--- a/Documentation/git-restore.txt
+++ b/Documentation/git-restore.txt
@@ -40,6 +40,10 @@ OPTIONS
+
If not specified, the contents are restored from `HEAD` if `--staged` is
given, otherwise from the index.
++
+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`.
-p::
--patch::