Doc: document "A...B" form for <tree-ish> in checkout and switch

Using "A...B" has been supported for the <tree-ish> argument for a
while. However, its support has never been explicitly documented.

Explicitly document it so that users know that it is available.

Signed-off-by: Denton Liu <liu.denton@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Denton Liu 2020-10-07 00:56:16 -07:00 committed by Junio C Hamano
parent 5602b500c3
commit c693ef781b
2 changed files with 8 additions and 0 deletions

View file

@ -350,6 +350,10 @@ leave out at most one of `A` and `B`, in which case it defaults to `HEAD`.
<tree-ish>:: <tree-ish>::
Tree to checkout from (when paths are given). If not specified, Tree to checkout from (when paths are given). If not specified,
the index will be used. 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. Do not interpret any more arguments as options.

View file

@ -40,6 +40,10 @@ OPTIONS
+ +
If not specified, the contents are restored from `HEAD` if `--staged` is If not specified, the contents are restored from `HEAD` if `--staged` is
given, otherwise from the index. 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:: -p::
--patch:: --patch::