Skip to content

Commit

Permalink
Documentation: describe check-ref-format --branch
Browse files Browse the repository at this point in the history
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 <jrnieder@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
  • Loading branch information
Jonathan Nieder authored and Junio C Hamano committed Oct 12, 2009
1 parent f01f109 commit 604e0cb
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions Documentation/git-check-ref-format.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ SYNOPSIS
--------
[verse]
'git check-ref-format' <refname>
'git check-ref-format' [--branch] <branchname-shorthand>
'git check-ref-format' --branch <branchname-shorthand>

DESCRIPTION
-----------
Expand Down Expand Up @@ -57,8 +57,11 @@ reference name expressions (see linkgit:git-rev-parse[1]):

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

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

EXAMPLE
-------
Expand Down

0 comments on commit 604e0cb

Please sign in to comment.