From: Denton Liu Date: Wed, 7 Oct 2020 07:56:16 +0000 (-0700) Subject: Doc: document "A...B" form for in checkout and switch X-Git-Tag: v2.30.0-rc0~151^2~2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c693ef781bef002bca15be74bec3a6a65c679eb5;p=thirdparty%2Fgit.git Doc: document "A...B" form for in checkout and switch Using "A...B" has been supported for the 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 Signed-off-by: Junio C Hamano --- diff --git a/Documentation/git-checkout.txt b/Documentation/git-checkout.txt index 5b697eee1b..8c2f736f3a 100644 --- a/Documentation/git-checkout.txt +++ b/Documentation/git-checkout.txt @@ -350,6 +350,10 @@ leave out at most one of `A` and `B`, in which case it defaults to `HEAD`. :: 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::