<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/Documentation/technical/api-parse-options.txt, branch v2.9.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.9.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.9.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2016-05-05T18:52:45Z</updated>
<entry>
<title>parse-options.c: make OPTION_COUNTUP respect "unspecified" values</title>
<updated>2016-05-05T18:52:45Z</updated>
<author>
<name>Pranit Bauva</name>
<email>pranit.bauva@gmail.com</email>
</author>
<published>2016-05-05T09:50:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=e0070e8bd575c069ddc0a469c43076290210e79e'/>
<id>urn:sha1:e0070e8bd575c069ddc0a469c43076290210e79e</id>
<content type='text'>
OPT_COUNTUP() merely increments the counter upon --option, and resets it
to 0 upon --no-option, which means that there is no "unspecified" value
with which a client can initialize the counter to determine whether or
not --[no]-option was seen at all.

Make OPT_COUNTUP() treat any negative number as an "unspecified" value
to address this shortcoming. In particular, if a client initializes the
counter to -1, then if it is still -1 after parse_options(), then
neither --option nor --no-option was seen; if it is 0, then --no-option
was seen last, and if it is 1 or greater, than --option was seen last.

This change does not affect the behavior of existing clients because
they all use the initial value of 0 (or more).

Note that builtin/clean.c initializes the variable used with
OPT__FORCE (which uses OPT_COUNTUP()) to a negative value, but it is set
to either 0 or 1 by reading the configuration before the code calls
parse_options(), i.e. as far as parse_options() is concerned, the
initial value of the variable is not negative.

To test this behavior, in test-parse-options.c, "verbose" is set to
"unspecified" while quiet is set to 0 which will test the new behavior
with all sets of values.

Helped-by: Jeff King &lt;peff@peff.net&gt;
Helped-by: Eric Sunshine &lt;sunshine@sunshineco.com&gt;
Helped-by: Junio C Hamano &lt;gitster@pobox.com&gt;
Signed-off-by: Pranit Bauva &lt;pranit.bauva@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>api-parse-options.txt: document OPT_CMDMODE()</title>
<updated>2016-03-25T20:17:43Z</updated>
<author>
<name>Pranit Bauva</name>
<email>pranit.bauva@gmail.com</email>
</author>
<published>2016-03-25T18:58:58Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=c3f6b853bfafa2046f2c6b0b9661d284436900b6'/>
<id>urn:sha1:c3f6b853bfafa2046f2c6b0b9661d284436900b6</id>
<content type='text'>
OPT_CMDMODE mechanism was introduced in the release of 1.8.5 to actively
notice when multiple "operation mode" options that specify mutually
incompatible operation modes are given.

Signed-off-by: Pranit Bauva &lt;pranit.bauva@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'pt/pull-builtin'</title>
<updated>2015-08-03T18:01:17Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2015-08-03T18:01:17Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=5f02274e4c4506b923b510a24da7991656f4db14'/>
<id>urn:sha1:5f02274e4c4506b923b510a24da7991656f4db14</id>
<content type='text'>
Reimplement 'git pull' in C.

* pt/pull-builtin:
  pull: remove redirection to git-pull.sh
  pull --rebase: error on no merge candidate cases
  pull --rebase: exit early when the working directory is dirty
  pull: configure --rebase via branch.&lt;name&gt;.rebase or pull.rebase
  pull: teach git pull about --rebase
  pull: set reflog message
  pull: implement pulling into an unborn branch
  pull: fast-forward working tree if head is updated
  pull: check if in unresolved merge state
  pull: support pull.ff config
  pull: error on no merge candidates
  pull: pass git-fetch's options to git-fetch
  pull: pass git-merge's options to git-merge
  pull: pass verbosity, --progress flags to fetch and merge
  pull: implement fetch + merge
  pull: implement skeletal builtin pull
  argv-array: implement argv_array_pushv()
  parse-options-cb: implement parse_opt_passthru_argv()
  parse-options-cb: implement parse_opt_passthru()
</content>
</entry>
<entry>
<title>parse-options: move unsigned long option parsing out of pack-objects.c</title>
<updated>2015-06-22T22:07:21Z</updated>
<author>
<name>Charles Bailey</name>
<email>cbailey32@bloomberg.net</email>
</author>
<published>2015-06-21T18:25:44Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=2a514ed8058e35841d3d7b05a898991b83e5eaf0'/>
<id>urn:sha1:2a514ed8058e35841d3d7b05a898991b83e5eaf0</id>
<content type='text'>
The unsigned long option parsing (including 'k'/'m'/'g' suffix
parsing) is more widely applicable.  Add support for OPT_MAGNITUDE
to parse-options.h and change pack-objects.c use this support.

The error behavior on parse errors follows that of OPT_INTEGER.  The
name of the option that failed to parse is reported with a brief
message describing the expect format for the option argument and
then the full usage message for the command invoked.

This differs from the previous behavior for OPT_ULONG used in
pack-objects for --max-pack-size and --window-memory which used to
display the value supplied in the error message and did not display
the full usage message.

Signed-off-by: Charles Bailey &lt;cbailey32@bloomberg.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>parse-options-cb: implement parse_opt_passthru_argv()</title>
<updated>2015-06-15T19:40:49Z</updated>
<author>
<name>Paul Tan</name>
<email>pyokagan@gmail.com</email>
</author>
<published>2015-06-14T08:41:49Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ffad85c599307441323de565c3fafde227e04a8f'/>
<id>urn:sha1:ffad85c599307441323de565c3fafde227e04a8f</id>
<content type='text'>
Certain git commands, such as git-pull, are simply wrappers around other
git commands like git-fetch, git-merge and git-rebase. As such, these
wrapper commands will typically need to "pass through" command-line
options of the commands they wrap.

Implement the parse_opt_passthru_argv() parse-options callback, which
will reconstruct all the provided command-line options into an
argv_array, such that it can be passed to another git command. This is
useful for passing command-line options that can be specified multiple
times.

Helped-by: Stefan Beller &lt;sbeller@google.com&gt;
Signed-off-by: Paul Tan &lt;pyokagan@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>parse-options-cb: implement parse_opt_passthru()</title>
<updated>2015-06-15T19:40:49Z</updated>
<author>
<name>Paul Tan</name>
<email>pyokagan@gmail.com</email>
</author>
<published>2015-06-14T08:41:48Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=6b3ee18dc5c620d7cb4324e009339b5ca9ac488c'/>
<id>urn:sha1:6b3ee18dc5c620d7cb4324e009339b5ca9ac488c</id>
<content type='text'>
Certain git commands, such as git-pull, are simply wrappers around other
git commands like git-fetch, git-merge and git-rebase. As such, these
wrapper commands will typically need to "pass through" command-line
options of the commands they wrap.

Implement the parse_opt_passthru() parse-options callback, which will
reconstruct the command-line option into an char* string, such that it
can be passed to another git command.

Helped-by: Johannes Schindelin &lt;johannes.schindelin@gmx.de&gt;
Helped-by: Junio C Hamano &lt;gitster@pobox.com&gt;
Helped-by: Stefan Beller &lt;sbeller@google.com&gt;
Signed-off-by: Paul Tan &lt;pyokagan@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>parse-options: remove unused OPT_SET_PTR</title>
<updated>2014-03-31T20:01:19Z</updated>
<author>
<name>Marat Radchenko</name>
<email>marat@slonopotamus.org</email>
</author>
<published>2014-03-30T11:08:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=20d1c6528c76242581e89c271679d35884d916dc'/>
<id>urn:sha1:20d1c6528c76242581e89c271679d35884d916dc</id>
<content type='text'>
OPT_SET_PTR was never used since its creation at db7244bd
(parse-options new features., 2007-11-07).

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Use the word 'stuck' instead of 'sticked'</title>
<updated>2013-10-31T22:47:38Z</updated>
<author>
<name>Nicolas Vigier</name>
<email>boklm@mars-attacks.org</email>
</author>
<published>2013-10-31T11:08:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b0d12fc9b23a0f656fe3a5dbe2899e85b7e2f5c0'/>
<id>urn:sha1:b0d12fc9b23a0f656fe3a5dbe2899e85b7e2f5c0</id>
<content type='text'>
The past participle of 'stick' is 'stuck'.

Signed-off-by: Nicolas Vigier &lt;boklm@mars-attacks.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'ph/builtin-srcs-are-in-subdir-these-days'</title>
<updated>2013-06-26T22:07:48Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2013-06-26T22:07:48Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=2ddc898bc0d0c3f03b4aeeb34c33f652d95f2807'/>
<id>urn:sha1:2ddc898bc0d0c3f03b4aeeb34c33f652d95f2807</id>
<content type='text'>
* ph/builtin-srcs-are-in-subdir-these-days:
  fix "builtin-*" references to be "builtin/*"
</content>
</entry>
<entry>
<title>fix "builtin-*" references to be "builtin/*"</title>
<updated>2013-06-18T18:05:51Z</updated>
<author>
<name>Phil Hord</name>
<email>hordp@cisco.com</email>
</author>
<published>2013-06-18T17:44:58Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=09b7e2204a8e41307192c800162e438ec09ddd2c'/>
<id>urn:sha1:09b7e2204a8e41307192c800162e438ec09ddd2c</id>
<content type='text'>
Documentation and some comments still refer to files in builtin/
as 'builtin-*.[cho]'.  Update these to show the correct location.

Signed-off-by: Phil Hord &lt;hordp@cisco.com&gt;
Reviewed-by: Jonathan Nieder &lt;jrnieder@gmail.com&gt;
Assisted-by: Junio C Hamano &lt;gitster@pobox.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
