aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/git-show-ref.txt
diff options
context:
space:
mode:
authorDoug Bell <madcityzen@gmail.com>2013-07-16 19:05:14 -0500
committerJunio C Hamano <gitster@pobox.com>2013-07-17 17:52:28 -0700
commit3f3d0cea61aba6ac2fef16736ef55e04bb735e02 (patch)
treeef25eaf931caa88319393d35aed9b088de977e0d /Documentation/git-show-ref.txt
parent239222f587ed06f96d90dd71c66d80a2b1e3dc9f (diff)
downloadgit-3f3d0cea61aba6ac2fef16736ef55e04bb735e02.tar.gz
show-ref: make --head always show the HEAD ref
The docs seem to say that doing git show-ref --head --tags would show both the HEAD ref and all the tag refs. However, doing both --head and either of --tags or --heads would filter out the HEAD ref. Also update the documentation to describe the new behavior and add tests for the show-ref command. [jc: Doug did proofread the tests, but it was done by me and bugs in it are mine]. Signed-off-by: Doug Bell <madcityzen@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'Documentation/git-show-ref.txt')
-rw-r--r--Documentation/git-show-ref.txt10
1 files changed, 6 insertions, 4 deletions
diff --git a/Documentation/git-show-ref.txt b/Documentation/git-show-ref.txt
index 5dbcd47fec..8a628995cf 100644
--- a/Documentation/git-show-ref.txt
+++ b/Documentation/git-show-ref.txt
@@ -21,6 +21,8 @@ commit IDs. Results can be filtered using a pattern and tags can be
dereferenced into object IDs. Additionally, it can be used to test whether a
particular ref exists.
+By default, shows the tags, heads, and remote refs.
+
The --exclude-existing form is a filter that does the inverse, it shows the
refs from stdin that don't exist in the local repository.
@@ -32,14 +34,14 @@ OPTIONS
--head::
- Show the HEAD reference.
+ Show the HEAD reference, even if it would normally be filtered out.
--tags::
--heads::
- Limit to only "refs/heads" and "refs/tags", respectively. These
- options are not mutually exclusive; when given both, references stored
- in "refs/heads" and "refs/tags" are displayed.
+ Limit to "refs/heads" and "refs/tags", respectively. These options
+ are not mutually exclusive; when given both, references stored in
+ "refs/heads" and "refs/tags" are displayed.
-d::
--dereference::