diff options
author | Junio C Hamano <gitster@pobox.com> | 2017-12-28 15:20:52 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2017-12-28 15:20:52 -0800 |
commit | 68e72b77e38cd977e75ab3e6e439a98a1d80e5d8 (patch) | |
tree | cd4002833c27711c19ca04f5baae1177179dcc94 /git-check-ref-format.txt | |
parent | 0f1291dcb49cd80bdb333eecb5f978a6a5ac3818 (diff) | |
download | git-htmldocs-68e72b77e38cd977e75ab3e6e439a98a1d80e5d8.tar.gz |
Autogenerated HTML docs for v2.16.0-rc0
Diffstat (limited to 'git-check-ref-format.txt')
-rw-r--r-- | git-check-ref-format.txt | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/git-check-ref-format.txt b/git-check-ref-format.txt index cf0a0b7df..d9de99258 100644 --- a/git-check-ref-format.txt +++ b/git-check-ref-format.txt @@ -79,16 +79,21 @@ reference name expressions (see linkgit:gitrevisions[7]): 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 +branch). But be cautious when using the +previous checkout syntax that may refer to a detached HEAD state. +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 -typed the branch name. +expanded for the ``previous checkout syntax'' +`@{-n}`. For example, `@{-1}` is a way to refer the last thing that +was checked out using "git checkout" operation. 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. As an +exception note that, the ``previous checkout operation'' might result +in a commit object name when the N-th last thing checked out was not +a branch. OPTIONS ------- @@ -116,7 +121,7 @@ OPTIONS EXAMPLES -------- -* Print the name of the previous branch: +* Print the name of the previous thing checked out: + ------------ $ git check-ref-format --branch @{-1} |