From: Junio C Hamano Date: Fri, 31 Mar 2023 16:12:18 GMT Subject: Re: [PATCH] doc: add that '-' is the same as '@{-1}' Message-ID: In-Reply-To: "ryicoh via GitGitGadget" writes: > 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. > > '@{-}', e.g. '@{-1}':: > The construct '@{-}' means the th branch/commit checked out > - before the current one. > + before the current one. You may also specify - which is synonymous > + to @{-1}. I know the author of the change meant well, but this change makes the resulting text overly broad and misleading by saying `-` is "synonymous". It is certainly *not* synonymous in general and I doubt we want to make it to. $ git switch --detach master $ git reset --hard maint $ git commit --amend -C - fatal: could not look up commit - $ git show - fatal: unrecognized argument: - $ git log ..- fatal: ambiguous argument '..-': unknown revision or path not in the working tree Use '--' to separate paths from revisions, like this: 'git [...] -- [