@matheusbsbs / matheus-bagliano / commits / 8bd26c4a2f
Fork 0

Documentation: show-ref: document --exclude-existing

Use the comment in the code to document the --exclude-existing function to git-show-ref. Signed-off-by: Julian Phillips <julian@quantumfyre.co.uk> Signed-off-by: Junio C Hamano <junkio@cox.net>

Julian Phillips committed Apr 9, 2007 at 21:57 UTC 8bd26c4a2f7539f6418934858710c674bb139cdd
1 file changed +16
Documentation/git-show-ref.txt
+16
@@ -10,6 +10,7 @@ SYNOPSIS
10 [verse]
11 'git-show-ref' [-q|--quiet] [--verify] [-h|--head] [-d|--dereference]
12 [-s|--hash] [--abbrev] [--tags] [--heads] [--] <pattern>...
13 +'git-show-ref' --exclude-existing[=pattern]
14
15 DESCRIPTION
16 -----------
@@ -19,6 +20,9 @@ commit IDs. Results can be filtered using a pattern and tags can be
20 dereferenced into object IDs. Additionally, it can be used to test whether a
21 particular ref exists.
22
23 +The --exclude-existing form is a filter that does the inverse, it shows the
24 +refs from stdin that don't exist in the local repository.
25 +
26 Use of this utility is encouraged in favor of directly accessing files under
27 in the `.git` directory.
28
@@ -61,6 +65,18 @@ OPTIONS
65 Do not print any results to stdout. When combined with '--verify' this
66 can be used to silently check if a reference exists.
67
68 +--exclude-existing, --exclude-existing=pattern::
69 +
70 + Make git-show-ref act as a filter that reads refs from stdin of the
71 + form "^(?:<anything>\s)?<refname>(?:\^\{\})?$" and performs the
72 + following actions on each:
73 + (1) strip "^{}" at the end of line if any;
74 + (2) ignore if pattern is provided and does not head-match refname;
75 + (3) warn if refname is not a well-formed refname and skip;
76 + (4) ignore if refname is a ref that exists in the local repository;
77 + (5) otherwise output the line.
78 +
79 +
80 <pattern>::
81
82 Show references matching one or more patterns.