From 8bd26c4a2f7539f6418934858710c674bb139cdd Mon Sep 17 00:00:00 2001 From: Julian Phillips Date: Mon, 9 Apr 2007 21:57:36 +0100 Subject: 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 Signed-off-by: Junio C Hamano --- Documentation/git-show-ref.txt | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'Documentation/git-show-ref.txt') diff --git a/Documentation/git-show-ref.txt b/Documentation/git-show-ref.txt index 5973a82517..2355aa5e86 100644 --- a/Documentation/git-show-ref.txt +++ b/Documentation/git-show-ref.txt @@ -10,6 +10,7 @@ SYNOPSIS [verse] 'git-show-ref' [-q|--quiet] [--verify] [-h|--head] [-d|--dereference] [-s|--hash] [--abbrev] [--tags] [--heads] [--] ... +'git-show-ref' --exclude-existing[=pattern] DESCRIPTION ----------- @@ -19,6 +20,9 @@ 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. +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. @@ -61,6 +65,18 @@ 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:: + + 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; + (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; + (5) otherwise output the line. + + :: Show references matching one or more patterns. -- cgit v1.2.3 From f029427259c97af9ea98358866e1d28974fa4da5 Mon Sep 17 00:00:00 2001 From: Johannes Sixt Date: Mon, 17 Dec 2007 10:08:23 +0100 Subject: Clean up documentation that references deprecated 'git peek-remote'. Now that 'git peek-remote' is deprecated and only an alias for 'git ls-remote', it should not be referenced from other manual pages. This also removes the description of the --exec option, which is no longer present. Signed-off-by: Johannes Sixt Signed-off-by: Junio C Hamano --- Documentation/git-show-ref.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Documentation/git-show-ref.txt') diff --git a/Documentation/git-show-ref.txt b/Documentation/git-show-ref.txt index 2355aa5e86..7893a50886 100644 --- a/Documentation/git-show-ref.txt +++ b/Documentation/git-show-ref.txt @@ -160,7 +160,7 @@ to get a listing of all tags together with what they dereference. SEE ALSO -------- -gitlink:git-ls-remote[1], gitlink:git-peek-remote[1] +gitlink:git-ls-remote[1] AUTHORS ------- -- cgit v1.2.3 From 5162e69732d13dd079919a389a6ace8878aad716 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Sat, 29 Dec 2007 00:20:38 -0600 Subject: Documentation: rename gitlink macro to linkgit Between AsciiDoc 8.2.2 and 8.2.3, the following change was made to the stock Asciidoc configuration: @@ -149,7 +153,10 @@ # Inline macros. # Backslash prefix required for escape processing. # (?s) re flag for line spanning. -(?su)[\\]?(?P\w(\w|-)*?):(?P\S*?)(\[(?P.*?)\])= + +# Explicit so they can be nested. +(?su)[\\]?(?P(http|https|ftp|file|mailto|callto|image|link)):(?P\S*?)(\[(?P.*?)\])= + # Anchor: [[[id]]]. Bibliographic anchor. (?su)[\\]?\[\[\[(?P[\w][\w-]*?)\]\]\]=anchor3 # Anchor: [[id,xreflabel]] This default regex now matches explicit values, and unfortunately in this case gitlink was being matched by just 'link', causing the wrong inline macro template to be applied. By renaming the macro, we can avoid being matched by the wrong regex. Signed-off-by: Dan McGee Signed-off-by: Junio C Hamano --- Documentation/git-show-ref.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Documentation/git-show-ref.txt') diff --git a/Documentation/git-show-ref.txt b/Documentation/git-show-ref.txt index 7893a50886..ce0e643fbe 100644 --- a/Documentation/git-show-ref.txt +++ b/Documentation/git-show-ref.txt @@ -130,7 +130,7 @@ When using the '--verify' flag, the command requires an exact path: will only match the exact branch called "master". -If nothing matches, gitlink:git-show-ref[1] will return an error code of 1, +If nothing matches, linkgit:git-show-ref[1] 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 @@ -160,7 +160,7 @@ to get a listing of all tags together with what they dereference. SEE ALSO -------- -gitlink:git-ls-remote[1] +linkgit:git-ls-remote[1] AUTHORS ------- @@ -169,4 +169,4 @@ Man page by Jonas Fonseca . GIT --- -Part of the gitlink:git[7] suite +Part of the linkgit:git[7] suite -- cgit v1.2.3 From 9e1f0a85c68323830ea117092c55192b17aa3ac8 Mon Sep 17 00:00:00 2001 From: Christian Couder Date: Fri, 6 Jun 2008 09:07:32 +0200 Subject: documentation: move git(7) to git(1) As the "git" man page describes the "git" command at the end-user level, it seems better to move it to man section 1. Signed-off-by: Christian Couder Signed-off-by: Junio C Hamano --- Documentation/git-show-ref.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Documentation/git-show-ref.txt') diff --git a/Documentation/git-show-ref.txt b/Documentation/git-show-ref.txt index ce0e643fbe..a85332c363 100644 --- a/Documentation/git-show-ref.txt +++ b/Documentation/git-show-ref.txt @@ -169,4 +169,4 @@ Man page by Jonas Fonseca . GIT --- -Part of the linkgit:git[7] suite +Part of the linkgit:git[1] suite -- cgit v1.2.3 From 3240240ff427fa2e26a847c7c9fd89e6a4313daa Mon Sep 17 00:00:00 2001 From: Stephan Beyer Date: Sun, 8 Jun 2008 03:36:09 +0200 Subject: Docs: Use "-l::\n--long\n" format in OPTIONS sections The OPTIONS section of a documentation file contains a list of the options a git command accepts. Currently there are several variants to describe the case that different options (almost) do the same in the OPTIONS section. Some are: -f, --foo:: -f|--foo:: -f | --foo:: But AsciiDoc has the special form: -f:: --foo:: This patch applies this form to the documentation of the whole git suite, and removes useless em-dash prevention, so \--foo becomes --foo. Signed-off-by: Stephan Beyer Signed-off-by: Junio C Hamano --- Documentation/git-show-ref.txt | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) (limited to 'Documentation/git-show-ref.txt') diff --git a/Documentation/git-show-ref.txt b/Documentation/git-show-ref.txt index a85332c363..6b99529b6b 100644 --- a/Documentation/git-show-ref.txt +++ b/Documentation/git-show-ref.txt @@ -29,22 +29,26 @@ in the `.git` directory. OPTIONS ------- --h, --head:: +-h:: +--head:: Show the HEAD reference. ---tags, --heads:: +--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. --d, --dereference:: +-d:: +--dereference:: Dereference tags into object IDs as well. They will be shown with "^{}" appended. --s, --hash:: +-s:: +--hash:: Only show the SHA1 hash, not the reference name. When also using --dereference the dereferenced tag will still be shown after the SHA1. @@ -55,17 +59,20 @@ 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:: +--abbrev=len:: Abbreviate the object name. When using `--hash`, you do not have to say `--hash --abbrev`; `--hash=len` would do. --q, --quiet:: +-q:: +--quiet:: 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:: +--exclude-existing=pattern:: 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 b1889c36d85514e5e70462294c561a02c2edfe2b Mon Sep 17 00:00:00 2001 From: Jonathan Nieder Date: Mon, 30 Jun 2008 01:09:04 -0500 Subject: Documentation: be consistent about "git-" versus "git " Since the git-* commands are not installed in $(bindir), using "git-command " in examples in the documentation is not a good idea. On the other hand, it is nice to be able to refer to each command using one hyphenated word. (There is no escaping it, anyway: man page names cannot have spaces in them.) This patch retains the dash in naming an operation, command, program, process, or action. Complete command lines that can be entered at a shell (i.e., without options omitted) are made to use the dashless form. The changes consist only of replacing some spaces with hyphens and vice versa. After a "s/ /-/g", the unpatched and patched versions are identical. Signed-off-by: Jonathan Nieder Signed-off-by: Junio C Hamano --- Documentation/git-show-ref.txt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'Documentation/git-show-ref.txt') diff --git a/Documentation/git-show-ref.txt b/Documentation/git-show-ref.txt index 6b99529b6b..c1f03d4bd7 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] [-h|--head] [-d|--dereference] [-s|--hash] [--abbrev] [--tags] [--heads] [--] ... -'git-show-ref' --exclude-existing[=pattern] +'git show-ref' --exclude-existing[=pattern] DESCRIPTION ----------- @@ -144,7 +144,7 @@ For scripting, you can ask it to be quiet with the "--quiet" flag, which allows you to do things like ----------------------------------------------------------------------------- - git-show-ref --quiet --verify -- "refs/heads/$headname" || + git show-ref --quiet --verify -- "refs/heads/$headname" || echo "$headname is not a valid branch" ----------------------------------------------------------------------------- -- cgit v1.2.3 From 483bc4f045881b998512ae814d6cf44d0c0cb493 Mon Sep 17 00:00:00 2001 From: Jonathan Nieder Date: Mon, 30 Jun 2008 13:56:34 -0500 Subject: Documentation formatting and cleanup Following what appears to be the predominant style, format names of commands and commandlines both as `teletype text`. While we're at it, add articles ("a" and "the") in some places, italicize the name of the command in the manual page synopsis line, and add a comma or two where it seems appropriate. Signed-off-by: Jonathan Nieder 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 c1f03d4bd7..a78a7dcf7a 100644 --- a/Documentation/git-show-ref.txt +++ b/Documentation/git-show-ref.txt @@ -74,7 +74,7 @@ OPTIONS --exclude-existing:: --exclude-existing=pattern:: - 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; @@ -137,7 +137,7 @@ When using the '--verify' flag, the command requires an exact path: will only match the exact branch called "master". -If nothing matches, linkgit:git-show-ref[1] 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 From ba020ef5eb5fca3d757bd580ff117adaf81ca079 Mon Sep 17 00:00:00 2001 From: Jonathan Nieder Date: Thu, 3 Jul 2008 00:41:41 -0500 Subject: manpages: italicize git command names (which were in teletype font) The names of git commands are not meant to be entered at the commandline; they are just names. So we render them in italics, as is usual for command names in manpages. Using doit () { perl -e 'for (<>) { s/\`(git-[^\`.]*)\`/'\''\1'\''/g; print }' } for i in git*.txt config.txt diff*.txt blame*.txt fetch*.txt i18n.txt \ merge*.txt pretty*.txt pull*.txt rev*.txt urls*.txt do doit <"$i" >"$i+" && mv "$i+" "$i" done git diff . Signed-off-by: Jonathan Nieder 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 a78a7dcf7a..9a4389981c 100644 --- a/Documentation/git-show-ref.txt +++ b/Documentation/git-show-ref.txt @@ -74,7 +74,7 @@ OPTIONS --exclude-existing:: --exclude-existing=pattern:: - 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; @@ -137,7 +137,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 From f448e24e2fe336621306b04b84e947bdd04f7ecc Mon Sep 17 00:00:00 2001 From: Abhijit Menon-Sen Date: Wed, 30 Jul 2008 15:03:43 +0530 Subject: Make the DESCRIPTION match ... items in the SYNOPSIS When the SYNOPSIS says e.g. "...", it is nice if the DESCRIPTION also mentions "..." and says the specified "paths" (note plural) are used for $whatever. This fixes the obvious mismatches. Signed-off-by: Abhijit Menon-Sen Signed-off-by: Junio C Hamano --- Documentation/git-show-ref.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Documentation/git-show-ref.txt') diff --git a/Documentation/git-show-ref.txt b/Documentation/git-show-ref.txt index 9a4389981c..2f173fff35 100644 --- a/Documentation/git-show-ref.txt +++ b/Documentation/git-show-ref.txt @@ -84,7 +84,7 @@ OPTIONS (5) otherwise output the line. -:: +...:: Show references matching one or more patterns. -- cgit v1.2.3 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