From e1258661c36d3a9f0cfe13f9d1f88d60a6f64b45 Mon Sep 17 00:00:00 2001 From: Junio C Hamano Date: Mon, 19 Nov 2007 05:03:19 +0000 Subject: [PATCH] Autogenerated HTML docs for v1.5.3.6-728-gea559 --- RelNotes-1.5.3.6.txt | 14 +++---- RelNotes-1.5.4.txt | 19 ++++++++-- git-rev-parse.html | 89 ++++++++++++++++++++++++++++++++++++++++++-- git-rev-parse.txt | 76 ++++++++++++++++++++++++++++++++++++- git.html | 2 +- git.txt | 1 + 6 files changed, 182 insertions(+), 19 deletions(-) diff --git a/RelNotes-1.5.3.6.txt b/RelNotes-1.5.3.6.txt index c9f948ec0..069a2b2cf 100644 --- a/RelNotes-1.5.3.6.txt +++ b/RelNotes-1.5.3.6.txt @@ -4,16 +4,18 @@ GIT v1.5.3.6 Release Notes Fixes since v1.5.3.5 -------------------- - * git-cvsexportcommit handles root commits better; + * git-cvsexportcommit handles root commits better. * git-svn dcommit used to clobber when sending a series of - patches; + patches. * git-svn dcommit failed after attempting to rebase when started with a dirty index; now it stops upfront. * git-grep sometimes refused to work when your index was - unmerged; + unmerged. + + * "git-grep -A1 -B2" acted as if it was told to run "git -A1 -B21". * git-hash-object did not honor configuration variables, such as core.compression. @@ -44,9 +46,3 @@ Fixes since v1.5.3.5 of deflateBound() has been added. * Quite a lot of documentation clarifications. - --- -exec >/var/tmp/1 -O=v1.5.3.5-57-gb574c8d -echo O=`git describe refs/heads/maint` -git shortlog --no-merges $O..refs/heads/maint diff --git a/RelNotes-1.5.4.txt b/RelNotes-1.5.4.txt index 229d77342..96ec55eb1 100644 --- a/RelNotes-1.5.4.txt +++ b/RelNotes-1.5.4.txt @@ -32,9 +32,9 @@ Updates since v1.5.3 (read: safer than the usual one) after the user accumulates too many loose objects. - * You need to explicitly set clean.requireForce to true to allow - git-clean to do any damage now (the configuration variable used - to default to false). + * You need to explicitly set clean.requireForce to "false" to allow + git-clean to do any damage (lack of the configuration variable + used to mean "do not require", but we now use the safer default). * git-push has been rewritten in C. @@ -56,6 +56,9 @@ Updates since v1.5.3 * git-lost-found was deprecated in favor of git-fsck's --lost-found option. + * "git log" learned --early-output option to help interactive + GUI implementations. + * git-svnimport was removed in favor of git-svn. * git-bisect learned "skip" action to mark untestable commits. @@ -78,6 +81,10 @@ Updates since v1.5.3 * "git cvsexportcommit" learned -w option to specify and switch to the CVS working directory. + * "git checkout" from a subdirectory learned to use "../path" + to allow checking out a path outside the current directory + without cd'ing up. + * Output processing for '--pretty=format:' has been optimized. @@ -105,8 +112,12 @@ this release, unless otherwise noted. * git-svn talking with the SVN over http will correctly quote branch and project names. + * "git rev-list --objects A..B" choked when the lower boundary + of the range involved a subproject. This fix is also queued + for 'maint' (but not in there yet). + -- exec >/var/tmp/1 -O=v1.5.3.5-736-geb9d2b9 +O=v1.5.3.6-727-g5d3d1ca echo O=`git describe refs/heads/master` git shortlog --no-merges $O..refs/heads/master ^refs/heads/maint diff --git a/git-rev-parse.html b/git-rev-parse.html index dc0dd6ea8..f5087c902 100644 --- a/git-rev-parse.html +++ b/git-rev-parse.html @@ -287,6 +287,23 @@ distinguish between them.

+--parseopt +
+
+

+ Use git-rev-parse in option parsing mode (see PARSEOPT section below). +

+
+
+--keep-dash-dash +
+
+

+ Only meaningful in --parseopt mode. Tells the option parser to echo + out the first -- met instead of skipping it. +

+
+
--revs-only
@@ -723,10 +740,76 @@ C^@ I J F F^! D G H D F
+

PARSEOPT

+
+

In --parseopt mode, git-rev-parse helps massaging options to bring to shell +scripts the same facilities C builtins have. It works as an option normalizer +(e.g. splits single switches aggregate values), a bit like getopt(1) does.

+

It takes on the standard input the specification of the options to parse and +understand, and echoes on the standard output a line suitable for sh(1) eval +to replace the arguments with normalized ones. In case of error, it outputs +usage on the standard error stream, and exits with code 129.

+

Input Format

+

git-rev-parse --parseopt input format is fully text based. It has two parts, +separated by a line that contains only --. The lines before the separator +(should be more than one) are used for the usage. +The lines after the separator describe the options.

+

Each line of options has this format:

+
+
+
<opt_spec><arg_spec>? SP+ help LF
+
+
+
+<opt_spec> +
+
+

+ its format is the short option character, then the long option name + separated by a comma. Both parts are not required, though at least one + is necessary. h,help, dry-run and f are all three correct + <opt_spec>. +

+
+
+<arg_spec> +
+
+

+ an <arg_spec> tells the option parser if the option has an argument + (=), an optional one (? though its use is discouraged) or none + (no <arg_spec> in that case). +

+
+
+

The remainder of the line, after stripping the spaces, is used +as the help associated to the option.

+

Blank lines are ignored, and lines that don't match this specification are used +as option group headers (start the line with a space to create such +lines on purpose).

+

Example

+
+
+
OPTS_SPEC="\
+some-command [options] <args>...
+
+some-command does foo and bar!
+--
+h,help    show the help
+
+foo       some nifty option --foo
+bar=      some cool option --bar with an argument
+
+  An option group Header
+C?        option C with an optional argument"
+
+eval `echo "$OPTS_SPEC" | git-rev-parse --parseopt -- "$@" || echo exit $?`
+
+

Author

-

Written by Linus Torvalds <torvalds@osdl.org> and -Junio C Hamano <junkio@cox.net>

+

Written by Linus Torvalds <torvalds@osdl.org> . +Junio C Hamano <junkio@cox.net> and Pierre Habouzit <madcoder@debian.org>

Documentation

@@ -738,7 +821,7 @@ Junio C Hamano <junkio@cox.net>

diff --git a/git-rev-parse.txt b/git-rev-parse.txt index 4758c33de..329fce0aa 100644 --- a/git-rev-parse.txt +++ b/git-rev-parse.txt @@ -23,6 +23,13 @@ distinguish between them. OPTIONS ------- +--parseopt:: + Use `git-rev-parse` in option parsing mode (see PARSEOPT section below). + +--keep-dash-dash:: + Only meaningful in `--parseopt` mode. Tells the option parser to echo + out the first `--` met instead of skipping it. + --revs-only:: Do not output flags and parameters not meant for `git-rev-list` command. @@ -288,10 +295,75 @@ Here are a handful examples: C^@ I J F F^! D G H D F +PARSEOPT +-------- + +In `--parseopt` mode, `git-rev-parse` helps massaging options to bring to shell +scripts the same facilities C builtins have. It works as an option normalizer +(e.g. splits single switches aggregate values), a bit like `getopt(1)` does. + +It takes on the standard input the specification of the options to parse and +understand, and echoes on the standard output a line suitable for `sh(1)` `eval` +to replace the arguments with normalized ones. In case of error, it outputs +usage on the standard error stream, and exits with code 129. + +Input Format +~~~~~~~~~~~~ + +`git-rev-parse --parseopt` input format is fully text based. It has two parts, +separated by a line that contains only `--`. The lines before the separator +(should be more than one) are used for the usage. +The lines after the separator describe the options. + +Each line of options has this format: + +------------ +? SP+ help LF +------------ + +``:: + its format is the short option character, then the long option name + separated by a comma. Both parts are not required, though at least one + is necessary. `h,help`, `dry-run` and `f` are all three correct + ``. + +``:: + an `` tells the option parser if the option has an argument + (`=`), an optional one (`?` though its use is discouraged) or none + (no `` in that case). + +The remainder of the line, after stripping the spaces, is used +as the help associated to the option. + +Blank lines are ignored, and lines that don't match this specification are used +as option group headers (start the line with a space to create such +lines on purpose). + +Example +~~~~~~~ + +------------ +OPTS_SPEC="\ +some-command [options] ... + +some-command does foo and bar! +-- +h,help show the help + +foo some nifty option --foo +bar= some cool option --bar with an argument + + An option group Header +C? option C with an optional argument" + +eval `echo "$OPTS_SPEC" | git-rev-parse --parseopt -- "$@" || echo exit $?` +------------ + + Author ------ -Written by Linus Torvalds and -Junio C Hamano +Written by Linus Torvalds . +Junio C Hamano and Pierre Habouzit Documentation -------------- diff --git a/git.html b/git.html index b53925843..9209d3b04 100644 --- a/git.html +++ b/git.html @@ -1925,7 +1925,7 @@ contributors on the git-list <git@vger.kernel.org>.

diff --git a/git.txt b/git.txt index 6db7ae1ea..546020100 100644 --- a/git.txt +++ b/git.txt @@ -46,6 +46,7 @@ Documentation for older releases are available here: * link:v1.5.3/git.html[documentation for release 1.5.3] * release notes for + link:RelNotes-1.5.3.6.txt[1.5.3.6], link:RelNotes-1.5.3.5.txt[1.5.3.5], link:RelNotes-1.5.3.4.txt[1.5.3.4], link:RelNotes-1.5.3.3.txt[1.5.3.3], -- 2.26.2