<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/parse-options.h, 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>2015-04-14T17:33:46Z</updated>
<entry>
<title>Merge branch 'iu/fix-parse-options-h-comment'</title>
<updated>2015-04-14T17:33:46Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2015-04-14T17:33:45Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=1d058dc6e5bdc6832906aa3237157787cbccda8a'/>
<id>urn:sha1:1d058dc6e5bdc6832906aa3237157787cbccda8a</id>
<content type='text'>
* iu/fix-parse-options-h-comment:
  parse-options.h: OPTION_{BIT,SET_INT} do not store pointer to defval
</content>
</entry>
<entry>
<title>parse-options.h: OPTION_{BIT,SET_INT} do not store pointer to defval</title>
<updated>2015-03-30T02:56:12Z</updated>
<author>
<name>Ivan Ukhov</name>
<email>ivan.ukhov@gmail.com</email>
</author>
<published>2015-03-29T08:32:55Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=d3c0811467153d3bf1732fef94530e5b0e7cdddf'/>
<id>urn:sha1:d3c0811467153d3bf1732fef94530e5b0e7cdddf</id>
<content type='text'>
When 20d1c652 (parse-options: remove unused OPT_SET_PTR, 2014-03-30)
removed OPT_SET_PTR, the comment in the header that describes what
the option did to defval field was left behind by mistake.  Remove
it.

Signed-off-by: Ivan Ukhov &lt;ivan.ukhov@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'jk/squelch-compiler-warning-from-funny-error-macro'</title>
<updated>2014-06-06T18:21:36Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2014-06-06T18:21:36Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=610a14f643b1dfe188e938492425cc88d96025a8'/>
<id>urn:sha1:610a14f643b1dfe188e938492425cc88d96025a8</id>
<content type='text'>
* jk/squelch-compiler-warning-from-funny-error-macro:
  let clang use the constant-return error() macro
  inline constant return from error() function
</content>
</entry>
<entry>
<title>let clang use the constant-return error() macro</title>
<updated>2014-05-06T22:30:40Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2014-05-06T15:17:50Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ff0a80af724e81dbad6a269847523e39c2e7e479'/>
<id>urn:sha1:ff0a80af724e81dbad6a269847523e39c2e7e479</id>
<content type='text'>
Commit e208f9c converted error() into a macro to make its
constant return value more apparent to calling code.  Commit
5ded807 prevents us using this macro with clang, since
clang's -Wunused-value is smart enough to realize that the
constant "-1" is useless in some contexts.

However, since the last commit puts the constant behind an
inline function call, this is enough to prevent the
-Wunused-value warning on both modern gcc and clang. So we
can now re-enable the macro when compiling with clang.

Tested with clang 3.3, 3.4, and 3.5.

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>inline constant return from error() function</title>
<updated>2014-05-06T22:30:38Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2014-05-06T15:14:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=87fe5df3653cf20b6bf9854bea42e4016c7d4688'/>
<id>urn:sha1:87fe5df3653cf20b6bf9854bea42e4016c7d4688</id>
<content type='text'>
Commit e208f9c introduced a macro to turn error() calls
into:

  (error(), -1)

to make the constant return value more visible to the
calling code (and thus let the compiler make better
decisions about the code).

This works well for code like:

  return error(...);

but the "-1" is superfluous in code that just calls error()
without caring about the return value. In older versions of
gcc, that was fine, but gcc 4.9 complains with -Wunused-value.

We can work around this by encapsulating the constant return
value in a static inline function, as gcc specifically
avoids complaining about unused function returns unless the
function has been specifically marked with the
warn_unused_result attribute.

We also use the same trick for config_error_nonbool and
opterror, which learned the same error technique in a469a10.

Reported-by: Felipe Contreras &lt;felipe.contreras@gmail.com&gt;
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>Merge branch 'mr/opt-set-ptr'</title>
<updated>2014-04-08T19:00:17Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2014-04-08T19:00:16Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b389e04031ffe4c725161a082ff748bd33688641'/>
<id>urn:sha1:b389e04031ffe4c725161a082ff748bd33688641</id>
<content type='text'>
OPT_SET_PTR() implementation was broken on IL32P64 platforms;
it turns out that the macro is not used by any real user.

* mr/opt-set-ptr:
  parse-options: remove unused OPT_SET_PTR
  parse-options: add cast to correct pointer type to OPT_SET_PTR
  MSVC: fix t0040-parse-options crash
</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>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>parse-options: multi-word argh should use dash to separate words</title>
<updated>2014-03-24T17:43:34Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2014-03-23T22:58:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=e703d7118c68bb5b1f850dae4060609a88500b18'/>
<id>urn:sha1:e703d7118c68bb5b1f850dae4060609a88500b18</id>
<content type='text'>
"When you need to use space, use dash" is a strange way to say that
you must not use a space.  Because it is more common for the command
line descriptions to use dashed-multi-words, you do not even want to
use spaces in these places.  Rephrase the documentation to avoid
this strangeness.

Fix a few existing multi-word argument help strings, i.e.

 - GPG key-ids given to -S/--gpg-sign are "key-id";
 - Refs used for storing notes are "notes-ref"; and
 - Expiry timestamps given to --expire are "expiry-date".

and update the corresponding documentation pages.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>parse-options: remove OPT_BOOLEAN</title>
<updated>2013-12-09T19:24:16Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2013-12-07T05:02:53Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=212c0a6ff2993530a1dadee9dfbbce9dc350b1d1'/>
<id>urn:sha1:212c0a6ff2993530a1dadee9dfbbce9dc350b1d1</id>
<content type='text'>
After a86a8b9 (sb/parseopt-boolean-removal), the deprecated
OPT_BOOLEAN is not used anywhere except by OPT__* macros. Kill
OPT_BOOLEAN and make OPT__* use OPT_COUNTUP directly instead. This
should stop OPT_BOOLEAN from entering the tree again in new patches.

OPT__DRY_RUN() is converted to use OPT_BOOL though because it does not
make sense to increase the level of dryness. All OPT__DRY_RUN call
sites have been checked and they look safe for OPT_BOOL.

Signed-off-by: Nguyễn Thái Ngọc Duy &lt;pclouds@gmail.com&gt;
Reviewed-by: Jonathan Nieder &lt;jrnieder@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
