From d4900ee48c70114ea3227f922d383de6b273fcde Mon Sep 17 00:00:00 2001 From: Stephen Boyd Date: Sat, 20 Jun 2009 21:40:45 -0700 Subject: 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. Signed-off-by: Stephen Boyd Signed-off-by: Junio C Hamano --- Documentation/git-show-ref.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Documentation/git-show-ref.txt') diff --git a/Documentation/git-show-ref.txt b/Documentation/git-show-ref.txt index 2f173fff35..98e294aa86 100644 --- a/Documentation/git-show-ref.txt +++ b/Documentation/git-show-ref.txt @@ -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:: -- cgit v1.2.3 From 69932bc6117d7ec2689557693ad300756c961cdc Mon Sep 17 00:00:00 2001 From: Stephen Boyd Date: Sat, 20 Jun 2009 21:40:46 -0700 Subject: 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. Signed-off-by: Stephen Boyd Signed-off-by: Junio C Hamano --- Documentation/git-show-ref.txt | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'Documentation/git-show-ref.txt') diff --git a/Documentation/git-show-ref.txt b/Documentation/git-show-ref.txt index 98e294aa86..f4429bdc68 100644 --- a/Documentation/git-show-ref.txt +++ b/Documentation/git-show-ref.txt @@ -9,8 +9,9 @@ SYNOPSIS -------- [verse] 'git show-ref' [-q|--quiet] [--verify] [-h|--head] [-d|--dereference] - [-s|--hash] [--abbrev] [--tags] [--heads] [--] ... -'git show-ref' --exclude-existing[=pattern] + [-s|--hash[=]] [--abbrev[=]] [--tags] + [--heads] [--] ... +'git show-ref' --exclude-existing[=] < ref-list DESCRIPTION ----------- @@ -48,7 +49,7 @@ OPTIONS appended. -s:: ---hash:: +--hash[=]:: 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[=]:: 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[=]:: Make 'git-show-ref' act as a filter that reads refs from stdin of the form "^(?:\s)?(?:\^\{\})?$" and performs the -- cgit v1.2.3 From e62b393505616c3ce313f6dac5060d9e1cde8e42 Mon Sep 17 00:00:00 2001 From: Jonathan Nieder Date: Mon, 9 Nov 2009 09:04:46 -0600 Subject: Show usage string for 'git show-ref -h' This only changes the behavior of "git show-ref -h" without any other options and arguments. "show-ref -h" currently is short for "show-ref --head", which shows all the refs/* and HEAD, as opposed to "show-ref" that shows all the refs/* and not HEAD. Does anybody use "show-ref -h"? It was in Linus's original, most likely only because "it might be handy", not because "the command should not show the HEAD by default for such and such reasons". So I think it is okay if "show-ref -h" (but not "show-ref --head") gives help and exits. If a current script uses "git show-ref -h" without any other arguments, it would have to be adapted by changing "-h" to "--head". Signed-off-by: Jonathan Nieder Signed-off-by: Junio C Hamano --- Documentation/git-show-ref.txt | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'Documentation/git-show-ref.txt') diff --git a/Documentation/git-show-ref.txt b/Documentation/git-show-ref.txt index f4429bdc68..70f400b266 100644 --- a/Documentation/git-show-ref.txt +++ b/Documentation/git-show-ref.txt @@ -8,7 +8,7 @@ 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[=]] [--abbrev[=]] [--tags] [--heads] [--] ... 'git show-ref' --exclude-existing[=] < ref-list @@ -30,7 +30,6 @@ the `.git` directory. OPTIONS ------- --h:: --head:: Show the HEAD reference. -- cgit v1.2.3 From 0b444cdb19bcfcc7f59b7b00783cbfbbc5ddcf63 Mon Sep 17 00:00:00 2001 From: Thomas Rast Date: Sun, 10 Jan 2010 00:33:00 +0100 Subject: Documentation: spell 'git cmd' without dash throughout The documentation was quite inconsistent when spelling 'git cmd' if it only refers to the program, not to some specific invocation syntax: both 'git-cmd' and 'git cmd' spellings exist. The current trend goes towards dashless forms, and there is precedent in 647ac70 (git-svn.txt: stop using dash-form of commands., 2009-07-07) to actively eliminate the dashed variants. Replace 'git-cmd' with 'git cmd' throughout, except where git-shell, git-cvsserver, git-upload-pack, git-receive-pack, and git-upload-archive are concerned, because those really live in the $PATH. --- Documentation/git-show-ref.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Documentation/git-show-ref.txt') diff --git a/Documentation/git-show-ref.txt b/Documentation/git-show-ref.txt index 70f400b266..df17d49b87 100644 --- a/Documentation/git-show-ref.txt +++ b/Documentation/git-show-ref.txt @@ -72,7 +72,7 @@ OPTIONS --exclude-existing[=]:: - Make 'git-show-ref' act as a filter that reads refs from stdin of the + Make 'git show-ref' act as a filter that reads refs from stdin of the form "^(?:\s)?(?:\^\{\})?$" and performs the following actions on each: (1) strip "^{}" at the end of line if any; @@ -135,7 +135,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 -- cgit v1.2.3