summaryrefslogtreecommitdiff
path: root/Documentation/git-show-ref.txt
diff options
context:
space:
mode:
Diffstat (limited to 'Documentation/git-show-ref.txt')
-rw-r--r--Documentation/git-show-ref.txt36
1 files changed, 20 insertions, 16 deletions
diff --git a/Documentation/git-show-ref.txt b/Documentation/git-show-ref.txt
index f4429bd..fcee000 100644
--- a/Documentation/git-show-ref.txt
+++ b/Documentation/git-show-ref.txt
@@ -8,9 +8,9 @@ git-show-ref - List references in a local repository
SYNOPSIS
--------
[verse]
-'git show-ref' [-q|--quiet] [--verify] [-h|--head] [-d|--dereference]
+'git show-ref' [-q|--quiet] [--verify] [--head] [-d|--dereference]
[-s|--hash[=<n>]] [--abbrev[=<n>]] [--tags]
- [--heads] [--] <pattern>...
+ [--heads] [--] [<pattern>...]
'git show-ref' --exclude-existing[=<pattern>] < ref-list
DESCRIPTION
@@ -30,7 +30,6 @@ the `.git` directory.
OPTIONS
-------
--h::
--head::
Show the HEAD reference.
@@ -45,7 +44,7 @@ OPTIONS
-d::
--dereference::
- Dereference tags into object IDs as well. They will be shown with "^{}"
+ Dereference tags into object IDs as well. They will be shown with "{caret}{}"
appended.
-s::
@@ -73,10 +72,10 @@ OPTIONS
--exclude-existing[=<pattern>]::
- Make 'git-show-ref' act as a filter that reads refs from stdin of the
- form "^(?:<anything>\s)?<refname>(?:\^\{\})?$" and performs the
- following actions on each:
- (1) strip "^{}" at the end of line if any;
+ Make 'git show-ref' act as a filter that reads refs from stdin of the
+ form "`{caret}(?:<anything>\s)?<refname>(?:{backslash}{caret}{})?$`"
+ and performs the following actions on each:
+ (1) strip "{caret}{}" at the end of line if any;
(2) ignore if pattern is provided and does not head-match refname;
(3) warn if refname is not a well-formed refname and skip;
(4) ignore if refname is a ref that exists in the local repository;
@@ -85,7 +84,11 @@ OPTIONS
<pattern>...::
- Show references matching one or more patterns.
+ Show references matching one or more patterns. Patterns are matched from
+ the end of the full name, and only complete parts are matched, e.g.
+ 'master' matches 'refs/heads/master', 'refs/remotes/origin/master',
+ 'refs/tags/jedi/master' but not 'refs/heads/mymaster' nor
+ 'refs/remotes/master/jedi'.
OUTPUT
------
@@ -136,7 +139,7 @@ When using the '--verify' flag, the command requires an exact path:
will only match the exact branch called "master".
-If nothing matches, 'git-show-ref' will return an error code of 1,
+If nothing matches, 'git show-ref' will return an error code of 1,
and in the case of verification, it will show an error message.
For scripting, you can ask it to be quiet with the "--quiet" flag, which
@@ -164,14 +167,15 @@ flag, so you can do
to get a listing of all tags together with what they dereference.
+FILES
+-----
+`.git/refs/*`, `.git/packed-refs`
+
SEE ALSO
--------
-linkgit:git-ls-remote[1]
-
-AUTHORS
--------
-Written by Linus Torvalds <torvalds@osdl.org>.
-Man page by Jonas Fonseca <fonseca@diku.dk>.
+linkgit:git-ls-remote[1],
+linkgit:git-update-ref[1],
+linkgit:gitrepository-layout[5]
GIT
---