Merge branch 'jm/relnotes-2.15-typofix'
[gitweb.git] / Documentation / git-check-ref-format.txt
index 8611a99120eb1c7070b64f80b39b1526225a8019..cf0a0b7df28e560a243805618bf9e5b093354eeb 100644 (file)
@@ -77,7 +77,14 @@ reference name expressions (see linkgit:gitrevisions[7]):
 
 . at-open-brace `@{` is used as a notation to access a reflog entry.
 
-With the `--branch` option, it expands the ``previous branch syntax''
+With the `--branch` option, the command takes a name and checks if
+it can be used as a valid branch name (e.g. when creating a new
+branch).  The rule `git check-ref-format --branch $name` implements
+may be stricter than what `git check-ref-format refs/heads/$name`
+says (e.g. a dash may appear at the beginning of a ref component,
+but it is explicitly forbidden at the beginning of a branch name).
+When run with `--branch` option in a repository, the input is first
+expanded for 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
@@ -100,10 +107,10 @@ OPTIONS
 --normalize::
        Normalize 'refname' by removing any leading slash (`/`)
        characters and collapsing runs of adjacent slashes between
-       name components into a single slash.  Iff the normalized
+       name components into a single slash.  If the normalized
        refname is valid then print it to standard output and exit
-       with a status of 0.  (`--print` is a deprecated way to spell
-       `--normalize`.)
+       with a status of 0, otherwise exit with a non-zero status.
+       (`--print` is a deprecated way to spell `--normalize`.)
 
 
 EXAMPLES