From: Junio C Hamano Date: Sun, 25 Oct 2009 22:34:21 +0000 (-0700) Subject: Merge branch 'jn/maint-1.6.3-check-ref-format-doc' into maint-1.6.4 X-Git-Tag: v1.6.5.2~2^2~1 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/1c92a08f286453bd28a1f6153249b2e2cf63cb38?ds=inline;hp=-c Merge branch 'jn/maint-1.6.3-check-ref-format-doc' into maint-1.6.4 * jn/maint-1.6.3-check-ref-format-doc: Documentation: describe check-ref-format --branch --- 1c92a08f286453bd28a1f6153249b2e2cf63cb38 diff --combined Documentation/git-check-ref-format.txt index 0b7982ea76,664da8a988..e9b3b40af4 --- a/Documentation/git-check-ref-format.txt +++ b/Documentation/git-check-ref-format.txt @@@ -9,7 -9,7 +9,7 @@@ SYNOPSI -------- [verse] 'git check-ref-format' - 'git check-ref-format' [--branch] + 'git check-ref-format' --branch DESCRIPTION ----------- @@@ -25,10 -25,6 +25,10 @@@ imposes the following rules on how refe grouping, but no slash-separated component can begin with a dot `.`. +. They must contain at least one `/`. This enforces the presence of a + category like `heads/`, `tags/` etc. but the actual names are not + restricted. + . They cannot have two consecutive dots `..` anywhere. . They cannot have ASCII control characters (i.e. bytes whose @@@ -42,8 -38,6 +42,8 @@@ . They cannot contain a sequence `@{`. +- They cannot contain a `\\`. + 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 unquoted (by mistake), and also avoids ambiguities in certain @@@ -63,8 -57,11 +63,11 @@@ reference name expressions (see linkgit . 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 -------