Skip to content

Commit 604e0cb

Browse files
jrngitster
authored andcommitted
Documentation: describe check-ref-format --branch
Unless one already knew, it was not obvious what sort of shorthand "git check-ref-format --branch" expands. Explain it. The --branch argument is not optional. Signed-off-by: Jonathan Nieder <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent f01f109 commit 604e0cb

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

Documentation/git-check-ref-format.txt

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ SYNOPSIS
99
--------
1010
[verse]
1111
'git check-ref-format' <refname>
12-
'git check-ref-format' [--branch] <branchname-shorthand>
12+
'git check-ref-format' --branch <branchname-shorthand>
1313

1414
DESCRIPTION
1515
-----------
@@ -57,8 +57,11 @@ reference name expressions (see linkgit:git-rev-parse[1]):
5757

5858
. at-open-brace `@{` is used as a notation to access a reflog entry.
5959

60-
With the `--branch` option, it expands a branch name shorthand and
61-
prints the name of the branch the shorthand refers to.
60+
With the `--branch` option, it expands the ``previous branch syntax''
61+
`@{-n}`. For example, `@{-1}` is a way to refer the last branch you
62+
were on. This option should be used by porcelains to accept this
63+
syntax anywhere a branch name is expected, so they can act as if you
64+
typed the branch name.
6265

6366
EXAMPLE
6467
-------

0 commit comments

Comments
 (0)