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>
Denton Liu committed
Oct 7, 2020 at 00:56 UTC
c693ef781bef002bca15be74bec3a6a65c679eb5
2 files changed
+8
Documentation/git-checkout.txt
+4
@@ -350,6 +350,10 @@ leave out at most one of `A` and `B`, in which case it defaults to `HEAD`.
350
<tree-ish>::
351
Tree to checkout from (when paths are given). If not specified,
352
the index will be used.
353
++
354
+As a special case, you may use `"A...B"` as a shortcut for the
355
+merge base of `A` and `B` if there is exactly one merge base. You can
356
+leave out at most one of `A` and `B`, in which case it defaults to `HEAD`.
357
358
\--::
359
Do not interpret any more arguments as options.
Documentation/git-restore.txt
+4
@@ -40,6 +40,10 @@ OPTIONS
40
+
41
If not specified, the contents are restored from `HEAD` if `--staged` is
42
given, otherwise from the index.
43
++
44
+As a special case, you may use `"A...B"` as a shortcut for the
45
+merge base of `A` and `B` if there is exactly one merge base. You can
46
+leave out at most one of `A` and `B`, in which case it defaults to `HEAD`.
47
48
-p::
49
--patch::