author | Junio C Hamano <gitster@pobox.com> | |
Mon, 19 Oct 2009 06:01:26 +0000 (23:01 -0700) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Mon, 19 Oct 2009 06:01:26 +0000 (23:01 -0700) |
* jn/maint-1.6.3-check-ref-format-doc:
Documentation: describe check-ref-format --branch
Documentation: describe check-ref-format --branch
1 | 2 | |||
---|---|---|---|---|
Documentation/git-check-ref-format.txt | patch | | diff1 | | diff2 | | blob | history |
diff --combined Documentation/git-check-ref-format.txt
index 0b7982ea76633e45b8d3073cd275ea74a757c0eb,664da8a988170ab09d16e3e30953b2cf0ea6c3df..e9b3b40af497c7b8508e31e171bf87e565b96963
--------
[verse]
'git check-ref-format' <refname>
- 'git check-ref-format' [--branch] <branchname-shorthand>
+ 'git check-ref-format' --branch <branchname-shorthand>
DESCRIPTION
-----------
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
. 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
. 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
-------