Skip to contentSkip to conversation

git-show-ref.txt: remove word and make consistent

PATCH New Stephen Boyd 1 participant 2 messages Jun 15, 2016 Documentation

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 git-show-ref.txt: remove word and make consistent

Under is better than in because of the nested nature of the .git directory.

"also using" sounds a little odd, plus we say combined with later on so just use that.

---
 Documentation/git-show-ref.txt |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
Documentation/git-show-ref.txt +2 -2
index 2f173ff..98e294a 100644
@@ -24,7 +24,7 @@ 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.
 
 Use of this utility is encouraged in favor of directly accessing files under
-in the `.git` directory.
+the `.git` directory.
 
 OPTIONS
 -------
@@ -50,7 +50,7 @@ OPTIONS
 -s::
 --hash::
 
-	Only show the SHA1 hash, not the reference name. When also using
+	Only show the SHA1 hash, not the reference name. When combined with
 	--dereference the dereferenced tag will still be shown after the SHA1.
 
 --verify::
Signature · 1 line
1.6.3.2.316.gda4e
#1 lore raw

PATCH 2/2 show-ref: migrate to parse-options

Also make the docs more consistent with the usage message. While we're here remove the zero initializers from the static variables as they're unnecessary.

---
 Documentation/git-show-ref.txt |   15 ++---
 builtin-show-ref.c             |  133 ++++++++++++++++++----------------------
 2 files changed, 67 insertions(+), 81 deletions(-)
Documentation/git-show-ref.txt +7 -8
index 98e294a..f4429bd 100644
@@ -9,8 +9,9 @@ SYNOPSIS
 --------
 [verse]
 'git show-ref' [-q|--quiet] [--verify] [-h|--head] [-d|--dereference]
-	     [-s|--hash] [--abbrev] [--tags] [--heads] [--] <pattern>...
-'git show-ref' --exclude-existing[=pattern]
+	     [-s|--hash[=<n>]] [--abbrev[=<n>]] [--tags]
+	     [--heads] [--] <pattern>...
+'git show-ref' --exclude-existing[=<pattern>] < ref-list
 
 DESCRIPTION
 -----------
@@ -48,7 +49,7 @@ OPTIONS
 	appended.
 
 -s::
---hash::
+--hash[=<n>]::
 
 	Only show the SHA1 hash, not the reference name. When combined with
 	--dereference the dereferenced tag will still be shown after the SHA1.
@@ -59,11 +60,10 @@ OPTIONS
 	Aside from returning an error code of 1, it will also print an error
 	message if '--quiet' was not specified.
 
---abbrev::
---abbrev=len::
+--abbrev[=<n>]::
 
 	Abbreviate the object name.  When using `--hash`, you do
-	not have to say `--hash --abbrev`; `--hash=len` would do.
+	not have to say `--hash --abbrev`; `--hash=n` would do.
 
 -q::
 --quiet::
@@ -71,8 +71,7 @@ OPTIONS
 	Do not print any results to stdout. When combined with '--verify' this
 	can be used to silently check if a reference exists.
 
---exclude-existing::
---exclude-existing=pattern::
+--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
builtin-show-ref.c +60 -73

151 lines not on this page · raw message

Signature · 1 line
1.6.3.2.316.gda4e