<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/parse-options.h, branch v2.0.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.0.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.0.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2014-04-08T19:00:17Z</updated>
<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>
<entry>
<title>Merge branch 'sb/parseopt-boolean-removal'</title>
<updated>2013-09-04T19:39:03Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2013-09-04T19:39:02Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=a86a8b9752d5abb7d0e6cd69017170e826d41fb5'/>
<id>urn:sha1:a86a8b9752d5abb7d0e6cd69017170e826d41fb5</id>
<content type='text'>
Convert most uses of OPT_BOOLEAN/OPTION_BOOLEAN that can use
OPT_BOOL/OPTION_BOOLEAN which have much saner semantics, and turn
remaining ones into OPT_SET_INT, OPT_COUNTUP, etc. as necessary.

* sb/parseopt-boolean-removal:
  revert: use the OPT_CMDMODE for parsing, reducing code
  checkout-index: fix negations of even numbers of -n
  config parsing options: allow one flag multiple times
  hash-object: replace stdin parsing OPT_BOOLEAN by OPT_COUNTUP
  branch, commit, name-rev: ease up boolean conditions
  checkout: remove superfluous local variable
  log, format-patch: parsing uses OPT__QUIET
  Replace deprecated OPT_BOOLEAN by OPT_BOOL
  Remove deprecated OPTION_BOOLEAN for parsing arguments
</content>
</entry>
<entry>
<title>Merge branch 'jc/parseopt-command-modes'</title>
<updated>2013-09-04T19:37:52Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2013-09-04T19:37:52Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=366b80bf0a84b607115bd4ffcd8e5ebfc7338442'/>
<id>urn:sha1:366b80bf0a84b607115bd4ffcd8e5ebfc7338442</id>
<content type='text'>
Many commands use --dashed-option as a operation mode selector
(e.g. "git tag --delete") that the user can use at most one
(e.g. "git tag --delete --verify" is a nonsense) and you cannot
negate (e.g. "git tag --no-delete" is a nonsense).  Make it easier
for users of parse_options() to enforce these restrictions.

* jc/parseopt-command-modes:
  tag: use OPT_CMDMODE
  parse-options: add OPT_CMDMODE()
</content>
</entry>
<entry>
<title>Merge branch 'maint'</title>
<updated>2013-08-09T22:49:55Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2013-08-09T22:49:55Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=96cb27a9d2db3c01b8e296a0fbc1da1da09d1412'/>
<id>urn:sha1:96cb27a9d2db3c01b8e296a0fbc1da1da09d1412</id>
<content type='text'>
* maint:
  parse-options: fix clang opterror() -Wunused-value warning
</content>
</entry>
<entry>
<title>parse-options: fix clang opterror() -Wunused-value warning</title>
<updated>2013-08-09T16:27:44Z</updated>
<author>
<name>Eric Sunshine</name>
<email>sunshine@sunshineco.com</email>
</author>
<published>2013-08-09T09:06:17Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=a3bc3d070cacf07dbe11b4bfec57554c8bbf1957'/>
<id>urn:sha1:a3bc3d070cacf07dbe11b4bfec57554c8bbf1957</id>
<content type='text'>
a469a1019352b8ef (silence some -Wuninitialized false positives;
2012-12-15) triggered "unused value" warnings when the return value of
opterror() and several other error-related functions was not used.
5ded807f7c0be10e (fix clang -Wunused-value warnings for error functions;
2013-01-16) applied a fix by adding #if !defined(__clang__) in cache.h
and git-compat-util.h, but misspelled it as #if !defined(clang) in
parse-options.h. Fix this.

This mistake went unnoticed because existing callers of opterror()
utilize its return value.  1158826394e162c5 (parse-options: add
OPT_CMDMODE(); 2013-07-30), however, adds a new invocation of opterror()
which ignores the return value, thus triggering the "unused value"
warning.

Signed-off-by: Eric Sunshine &lt;sunshine@sunshineco.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Remove deprecated OPTION_BOOLEAN for parsing arguments</title>
<updated>2013-08-05T18:32:17Z</updated>
<author>
<name>Stefan Beller</name>
<email>stefanbeller@googlemail.com</email>
</author>
<published>2013-08-03T11:51:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=4741edd549decfccc016fa4775b349fe94fdf4e5'/>
<id>urn:sha1:4741edd549decfccc016fa4775b349fe94fdf4e5</id>
<content type='text'>
As of b04ba2bb4 OPTION_BOOLEAN was deprecated.
This commit removes all occurrences of OPTION_BOOLEAN.
In b04ba2bb4 Junio suggested to replace it with either
OPTION_SET_INT or OPTION_COUNTUP instead. However a pattern, which
occurred often with the OPTION_BOOLEAN was a hidden boolean parameter.
So I defined OPT_HIDDEN_BOOL as an additional possible parse option
in parse-options.h to make life easy.

The OPT_HIDDEN_BOOL was used in checkout, clone, commit, show-ref.
The only exception, where there was need to fiddle with OPTION_SET_INT
was log and notes. However in these two files there is also a pattern,
so we could think of introducing OPT_NONEG_BOOL.

Signed-off-by: Stefan Beller &lt;stefanbeller@googlemail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
