X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=Documentation%2Fgit-check-ref-format.txt;h=c1ce26884e73f1599602472ba5032988486cc465;hb=9e4a90ba19033d25dca1eea495b0a8c5f06efbc6;hp=171b68377d6604167fde4f5e4266432fa9048345;hpb=197cf8d59c0109f486ed6b56512b3c54ea44dccd;p=git.git diff --git a/Documentation/git-check-ref-format.txt b/Documentation/git-check-ref-format.txt index 171b68377..c1ce26884 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' +'git check-ref-format' [--branch] 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 ---