[prev in list] [next in list] [prev in thread] [next in thread]
List: git
Subject: Re: [PATCH] doc: add that '-' is the same as '@{-1}'
From: Phillip Wood <phillip.wood123 () gmail ! com>
Date: 2023-03-31 16:29:48
Message-ID: 6c2c663d-9d91-3395-5dd5-844d6daef57a () dunelm ! org ! uk
[Download RAW message or body]
Hi ryicoh
On 31/03/2023 11:11, ryicoh via GitGitGadget wrote:
> From: ryicoh <ryicoh@gmail.com>
>
> Signed-off-by: ryicoh <ryicoh@gmail.com>
> ---
> doc: add that '-' is the same as '@{-1}'
A few commands (checkout, merge, rebase and switch spring to mind)
accept '-' as a shorthand for '@{-1}' but I don't think it is
universally accepted.
Best Wishes
Phillip
>
> Now, the document of '-' is written only git-switch.txt.
>
> https://github.com/git/git/blob/6369acd968d02899973a9a853c48029b92cea401/Documentation/git-switch.txt#L51
>
> I want same one in revisions.txt.
>
> Thank you.
>
> Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-git-1484%2Fryicoh%2Fdoc-hyphen-v1
>
> Fetch-It-Via: git fetch https://github.com/gitgitgadget/git \
> pr-git-1484/ryicoh/doc-hyphen-v1
> Pull-Request: https://github.com/git/git/pull/1484
>
> Documentation/revisions.txt | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/Documentation/revisions.txt b/Documentation/revisions.txt
> index 9aa58052bc7..9e7ea2cf71e 100644
> --- a/Documentation/revisions.txt
> +++ b/Documentation/revisions.txt
> @@ -94,7 +94,8 @@ some output processing may assume ref names in UTF-8.
>
> '@{-<n>}', e.g. '@{-1}'::
> The construct '@{-<n>}' means the <n>th branch/commit checked out
> - before the current one.
> + before the current one. You may also specify - which is synonymous
> + to @{-1}.
>
> '[<branchname>]@\{upstream\}', e.g. 'master@\{upstream\}', '@\{u\}'::
> A branch B may be set up to build on top of a branch X (configured with
>
> base-commit: 6369acd968d02899973a9a853c48029b92cea401
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic