Documentation: @{-N} can refer to a commit
authorThomas Rast <tr@thomasrast.ch>
Sun, 19 Jan 2014 07:01:15 +0000 (08:01 +0100)
committerJunio C Hamano <gitster@pobox.com>
Tue, 21 Jan 2014 21:50:00 +0000 (13:50 -0800)
The @{-N} syntax always referred to the N-th last thing checked out,
which can be either a branch or a commit (for detached HEAD cases).
However, the documentation only mentioned branches.

Edit in a "/commit" in the appropriate places.

Reported-by: Kevin <ikke@ikke.info>
Signed-off-by: Thomas Rast <tr@thomasrast.ch>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/git-checkout.txt
Documentation/revisions.txt
index 91294f89c89dbbfef93bbb7f38074827938f48f6..33ad2adf5ce86119e55f94fa1d29233e8caf4a67 100644 (file)
@@ -232,8 +232,8 @@ section of linkgit:git-add[1] to learn how to operate the `--patch` mode.
        commit, your HEAD becomes "detached" and you are no longer on
        any branch (see below for details).
 +
-As a special case, the `"@{-N}"` syntax for the N-th last branch
-checks out the branch (instead of detaching).  You may also specify
+As a special case, the `"@{-N}"` syntax for the N-th last branch/commit
+checks out branches (instead of detaching).  You may also specify
 `-` which is synonymous with `"@{-1}"`.
 +
 As a further special case, you may use `"A...B"` as a shortcut for the
index 2c06ed34ad2ed72f9cf856fb617e54a1956da599..5a286d0d61ffc5b3daa00d7d550d5931a91b35ec 100644 (file)
@@ -88,7 +88,7 @@ some output processing may assume ref names in UTF-8.
   branch 'blabla' then '@\{1\}' means the same as 'blabla@\{1\}'.
 
 '@\{-<n>\}', e.g. '@\{-1\}'::
-  The construct '@\{-<n>\}' means the <n>th branch checked out
+  The construct '@\{-<n>\}' means the <n>th branch/commit checked out
   before the current one.
 
 '<branchname>@\{upstream\}', e.g. 'master@\{upstream\}', '@\{u\}'::