<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/test-parse-options.c, branch v2.4.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.4.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.4.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2014-03-31T20:01:19Z</updated>
<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>parse-options: add cast to correct pointer type to OPT_SET_PTR</title>
<updated>2014-03-31T18:55:41Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2014-03-30T02:01:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=9ff8ff310b71ab79ffb0ecaa004dec65cec31a45'/>
<id>urn:sha1:9ff8ff310b71ab79ffb0ecaa004dec65cec31a45</id>
<content type='text'>
Do not force users of OPT_SET_PTR to cast pointer to correct
underlying pointer type by integrating cast into OPT_SET_PTR macro.

Cast is required to prevent 'initialization makes integer from pointer
without a cast' compiler warning.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>MSVC: fix t0040-parse-options crash</title>
<updated>2014-03-31T18:54:27Z</updated>
<author>
<name>Marat Radchenko</name>
<email>marat@slonopotamus.org</email>
</author>
<published>2014-03-30T11:08:21Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=e25c070cb5c85ac3abe787373563a31c8893a669'/>
<id>urn:sha1:e25c070cb5c85ac3abe787373563a31c8893a669</id>
<content type='text'>
On 64-bit MSVC, pointers are 64 bit but `long` is only 32.
Thus, casting string to `unsigned long`, which is redundand on other
platforms, throws away important bits and when later cast to `intptr_t`
results in corrupt pointer.

This patch fixes test-parse-options by replacing harming cast with
correct one.

Signed-off-by: Marat Radchenko &lt;marat@slonopotamus.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>sparse: Fix mingw_main() argument number/type errors</title>
<updated>2013-04-28T19:32:08Z</updated>
<author>
<name>Ramsay Jones</name>
<email>ramsay@ramsay1.demon.co.uk</email>
</author>
<published>2013-04-27T19:19:47Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=84d32bf7678259c08406571cd6ce4b7a6724dcba'/>
<id>urn:sha1:84d32bf7678259c08406571cd6ce4b7a6724dcba</id>
<content type='text'>
Sparse issues 68 errors (two errors for each main() function) such
as the following:

      SP git.c
  git.c:510:5: error: too many arguments for function mingw_main
  git.c:510:5: error: symbol 'mingw_main' redeclared with different type \
    (originally declared at git.c:510) - different argument counts

The errors are caused by the 'main' macro used by the MinGW build
to provide a replacement main() function. The original main function
is effectively renamed to 'mingw_main' and is called from the new
main function. The replacement main is used to execute certain actions
common to all git programs on MinGW (e.g. ensure the standard I/O
streams are in binary mode).

In order to suppress the errors, we change the macro to include the
parameters in the declaration of the mingw_main function.

Unfortunately, this change provokes both sparse and gcc to complain
about 9 calls to mingw_main(), such as the following:

      CC git.o
  git.c: In function 'main':
  git.c:510: warning: passing argument 2 of 'mingw_main' from \
    incompatible pointer type
  git.c:510: note: expected 'const char **' but argument is of \
    type 'char **'

In order to suppress these warnings, since both of the main
functions need to be declared with the same prototype, we
change the declaration of the 9 main functions, thus:

    int main(int argc, char **argv)

Signed-off-by: Ramsay Jones &lt;ramsay@ramsay1.demon.co.uk&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>test-parse-options: convert to OPT_BOOL()</title>
<updated>2012-02-26T23:18:41Z</updated>
<author>
<name>René Scharfe</name>
<email>rene.scharfe@lsrfire.ath.cx</email>
</author>
<published>2012-02-25T19:11:16Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b9e63ddddc8928f39db6658bf6428a9b646e5ea5'/>
<id>urn:sha1:b9e63ddddc8928f39db6658bf6428a9b646e5ea5</id>
<content type='text'>
Introduce OPT_BOOL() to test-parse-options and add some tests for
these "true" boolean options. Rename OPT_BOOLEAN to OPT_COUNTUP and
OPTION_BOOLEAN to OPTION_COUNTUP as well.

Signed-off-by: Rene Scharfe &lt;rene.scharfe@lsrfire.ath.cx&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>parseopt: add OPT_NOOP_NOARG</title>
<updated>2011-09-28T19:46:21Z</updated>
<author>
<name>René Scharfe</name>
<email>rene.scharfe@lsrfire.ath.cx</email>
</author>
<published>2011-09-28T17:44:30Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=6acec0380bfcd5e3f91c9100bf4d415db8f7acfd'/>
<id>urn:sha1:6acec0380bfcd5e3f91c9100bf4d415db8f7acfd</id>
<content type='text'>
Add OPT_NOOP_NOARG, a helper macro to define deprecated options in a
standard way.  The help text is taken from the no-op option -r of
git revert.

The callback could be made to emit a (conditional?) warning later.  And
we could also add OPT_NOOP (requiring an argument) etc. as needed.

Signed-off-by: Rene Scharfe &lt;rene.scharfe@lsrfire.ath.cx&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>parse-options: add OPT_STRING_LIST helper</title>
<updated>2011-06-22T18:25:20Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2011-06-09T15:55:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=c8ba163916554e9ffd3ce8cb2beeff003d90c0c3'/>
<id>urn:sha1:c8ba163916554e9ffd3ce8cb2beeff003d90c0c3</id>
<content type='text'>
This just adds repeated invocations of an option to a list
of strings. Using the "--no-&lt;var&gt;" form will reset the list
to empty.

Signed-off-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Make &lt;identifier&gt; lowercase as per CodingGuidelines</title>
<updated>2011-02-15T19:53:11Z</updated>
<author>
<name>Michael J Gruber</name>
<email>git@drmicha.warpmail.net</email>
</author>
<published>2011-02-15T13:09:13Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=41dbcd45409b2986c011e67dd9e2b4d3072fc88d'/>
<id>urn:sha1:41dbcd45409b2986c011e67dd9e2b4d3072fc88d</id>
<content type='text'>
*.c part for matches with '&lt;[A-Z]+&gt;' (and affected test).

Signed-off-by: Michael J Gruber &lt;git@drmicha.warpmail.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>add description parameter to OPT__QUIET</title>
<updated>2010-11-15T17:58:13Z</updated>
<author>
<name>René Scharfe</name>
<email>rene.scharfe@lsrfire.ath.cx</email>
</author>
<published>2010-11-08T18:06:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=d52ee6e6131f65bb4360743ebea2e7b400b544e4'/>
<id>urn:sha1:d52ee6e6131f65bb4360743ebea2e7b400b544e4</id>
<content type='text'>
Allows better help text to be defined than "be quiet".  Also make use
of the macro in a place that already had a different description.  No
object code changes intended.

Signed-off-by: Rene Scharfe &lt;rene.scharfe@lsrfire.ath.cx&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>add description parameter to OPT__DRY_RUN</title>
<updated>2010-11-15T17:57:37Z</updated>
<author>
<name>René Scharfe</name>
<email>rene.scharfe@lsrfire.ath.cx</email>
</author>
<published>2010-11-08T17:58:51Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=e21adb8c100cd2859cff1d74f7d0e622ac640085'/>
<id>urn:sha1:e21adb8c100cd2859cff1d74f7d0e622ac640085</id>
<content type='text'>
Allows better help text to be defined than "dry run".  Also make use
of the macro in places that already had a different description.  No
object code changes intended.

Signed-off-by: Rene Scharfe &lt;rene.scharfe@lsrfire.ath.cx&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
