summaryrefslogtreecommitdiff
path: root/Documentation/git-check-ref-format.txt
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation/git-check-ref-format.txt')
-rw-r--r--Documentation/git-check-ref-format.txt20
1 files changed, 19 insertions, 1 deletions
diff --git a/Documentation/git-check-ref-format.txt b/Documentation/git-check-ref-format.txt
index 171b683..c1ce268 100644
--- a/Documentation/git-check-ref-format.txt
+++ b/Documentation/git-check-ref-format.txt
@@ -7,7 +7,9 @@ git-check-ref-format - Ensures that a reference name is well formed
SYNOPSIS
--------
+[verse]
'git check-ref-format' <refname>
+'git check-ref-format' [--branch] <branchname-shorthand>
DESCRIPTION
-----------
@@ -30,7 +32,11 @@ imposes the following rules on how references are named:
caret `{caret}`, colon `:`, question-mark `?`, asterisk `*`,
or open bracket `[` anywhere.
-. They cannot end with a slash `/`.
+. They cannot end with a slash `/` nor a dot `.`.
+
+. They cannot end with the sequence `.lock`.
+
+. They cannot contain a sequence `@{`.
These rules make it easy for shell script based tools to parse
reference names, pathname expansion by the shell when a reference name is used
@@ -49,6 +55,18 @@ reference name expressions (see linkgit:git-rev-parse[1]):
It may also be used to select a specific object such as with
'git-cat-file': "git cat-file blob v1.3.3:refs.c".
+. 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.
+
+EXAMPLE
+-------
+
+git check-ref-format --branch @{-1}::
+
+Print the name of the previous branch.
+
GIT
---