<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/git.git/parse-options.h, branch v1.6.4.5</title>
<subtitle>Git
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/git.git/atom?h=v1.6.4.5</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/atom?h=v1.6.4.5'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/'/>
<updated>2009-06-18T17:36:22Z</updated>
<entry>
<title>Merge branch 'sb/parse-options-integer'</title>
<updated>2009-06-18T17:36:22Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2009-06-18T17:36:22Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=d978ead4c3933425f54142f2c3fab7f5071e36ef'/>
<id>urn:sha1:d978ead4c3933425f54142f2c3fab7f5071e36ef</id>
<content type='text'>
* sb/parse-options-integer:
  parse-options: simplify usage argh handling
  parse-options: make OPT_INTEGER's argh explicit
</content>
</entry>
<entry>
<title>show-branch: don't use LASTARG_DEFAULT with OPTARG</title>
<updated>2009-06-09T07:15:57Z</updated>
<author>
<name>Stephen Boyd</name>
<email>bebarino@gmail.com</email>
</author>
<published>2009-06-07T23:39:15Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=e169b974593c27ba7a0d7f63ec0ec40373cb64bb'/>
<id>urn:sha1:e169b974593c27ba7a0d7f63ec0ec40373cb64bb</id>
<content type='text'>
5734365 (show-branch: migrate to parse-options API 2009-05-21)
incorrectly set the --more option's flags to be
PARSE_OPT_LASTARG_DEFAULT and PARSE_OPT_OPTARG. These two flags
shouldn't be used together. An option taking a default should just set
the default value desired and parse options will take care of the rest.

Update the header comment to better convey this information.

Signed-off-by: Stephen Boyd &lt;bebarino@gmail.com&gt;
Acked-by: René 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: simplify usage argh handling</title>
<updated>2009-06-06T20:25:34Z</updated>
<author>
<name>Stephen Boyd</name>
<email>bebarino@gmail.com</email>
</author>
<published>2009-06-04T23:43:57Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=34aec9f573af8e6fbe06285d660d9e1a84950e4c'/>
<id>urn:sha1:34aec9f573af8e6fbe06285d660d9e1a84950e4c</id>
<content type='text'>
Simplify the argh printing by simply calling usage_argh() if the option
can take an argument. Update macros defined in parse-options.h to set
the PARSE_OPT_NOARG flag.

The only other user of custom non-argument taking options is git-apply
(in this case OPTION_BOOLEAN for deprecated options). Update it to set
the PARSE_OPT_NOARG flag.

Thanks to Ren辿 Scharfe for the suggestion and starter patch.

Signed-off-by: Stephen Boyd &lt;bebarino@gmail.com&gt;
Reviewd-by: René 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: make OPT_INTEGER's argh explicit</title>
<updated>2009-06-06T20:25:01Z</updated>
<author>
<name>Stephen Boyd</name>
<email>bebarino@gmail.com</email>
</author>
<published>2009-06-04T23:43:56Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=e3a0ca878457ecc70d0065802fcb0c6875c6b671'/>
<id>urn:sha1:e3a0ca878457ecc70d0065802fcb0c6875c6b671</id>
<content type='text'>
OPTION_INTEGER hardcodes its argh member to be "n", but the decision is
hidden deep in usage_with_options_internal(). Make "n" the default argh
for the OPT_INTEGER macro while leaving it undecided for the OPTION_INTEGER
enum.

This makes it less surprising to users that argh is "n" when using the
OPT_INTEGER macro.

Signed-off-by: Stephen Boyd &lt;bebarino@gmail.com&gt;
Reviewed-by: René Scharfe &lt;rene.scharfe@lsrfire.ath.cx&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>parse-opts: add OPT_FILENAME and transition builtins</title>
<updated>2009-05-25T08:07:33Z</updated>
<author>
<name>Stephen Boyd</name>
<email>bebarino@gmail.com</email>
</author>
<published>2009-05-23T18:53:13Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=df217ed6430efe444a09fffdafd39720ae3f9864'/>
<id>urn:sha1:df217ed6430efe444a09fffdafd39720ae3f9864</id>
<content type='text'>
Commit dbd0f5c (Files given on the command line are relative to $cwd,
2008-08-06) introduced parse_options_fix_filename() as a minimal fix.
OPT_FILENAME is intended to be a more robust fix for the same issue.
OPT_FILENAME and its associated enum OPTION_FILENAME are used to
represent filename options within the parse options API.

This option is similar to OPTION_STRING. If --no is prefixed to the
option the filename is unset. If no argument is given and the default
value is set, the filename is set to the default value. The difference
is that the filename is prefixed with the prefix passed to
parse_options() (or parse_options_start()).

Update git-apply, git-commit, git-fmt-merge-msg, and git-tag to use
OPT_FILENAME with their filename options. Also, rename
parse_options_fix_filename() to fix_filename() as it is no longer
extern.

Signed-off-by: Stephen Boyd &lt;bebarino@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>parse-opts: prepare for OPT_FILENAME</title>
<updated>2009-05-25T08:07:25Z</updated>
<author>
<name>Stephen Boyd</name>
<email>bebarino@gmail.com</email>
</author>
<published>2009-05-23T18:53:12Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=377829201783b8a648e07af6ce7d747e0f45dc19'/>
<id>urn:sha1:377829201783b8a648e07af6ce7d747e0f45dc19</id>
<content type='text'>
To give OPT_FILENAME the prefix, we pass the prefix to parse_options()
which passes the prefix to parse_options_start() which sets the prefix
member of parse_opts_ctx accordingly. If there isn't a prefix in the
calling context, passing NULL will suffice.

Signed-off-by: Stephen Boyd &lt;bebarino@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'sb/show-branch-parse-options' into sb/opt-filename</title>
<updated>2009-05-25T07:59:29Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2009-05-25T07:59:29Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=b064e2fc3d197c3c691fe89c43d1bf79f64fcdf7'/>
<id>urn:sha1:b064e2fc3d197c3c691fe89c43d1bf79f64fcdf7</id>
<content type='text'>
* sb/show-branch-parse-options:
  show-branch: migrate to parse-options API
  parse-options: add PARSE_OPT_LITERAL_ARGHELP for complicated argh's

Conflicts:
	parse-options.h
</content>
</entry>
<entry>
<title>parse-options: add PARSE_OPT_LITERAL_ARGHELP for complicated argh's</title>
<updated>2009-05-23T05:46:04Z</updated>
<author>
<name>Stephen Boyd</name>
<email>bebarino@gmail.com</email>
</author>
<published>2009-05-21T07:33:17Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=29f25d493c1021a53acf41e5763e732217dd75c3'/>
<id>urn:sha1:29f25d493c1021a53acf41e5763e732217dd75c3</id>
<content type='text'>
Usually, the argh element in struct option points at a placeholder value
(e.g. "val"), and is shown in the usage message as

    --option=&lt;val&gt;

by enclosing the string inside of angle brackets.

When the option is more complex (e.g. optional arguments separated by a
comma), you would want to produce a usage message that looks like

    --option=&lt;val1&gt;[,&lt;val2&gt;]

In such a case, the caller can pass a string to argh with placeholders
already enclosed in necessary angle brackets (e.g.  "&lt;val1&gt;[,&lt;val2&gt;]")
and set this flag.

Signed-off-by: Stephen Boyd &lt;bebarino@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>parseopt: add PARSE_OPT_NODASH</title>
<updated>2009-05-09T07:29:50Z</updated>
<author>
<name>René Scharfe</name>
<email>rene.scharfe@lsrfire.ath.cx</email>
</author>
<published>2009-05-07T19:45:42Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=51a9949eda7421a2dd9cb45b2110d6571ba09bbd'/>
<id>urn:sha1:51a9949eda7421a2dd9cb45b2110d6571ba09bbd</id>
<content type='text'>
Add support for options that don't start with a dash.  Initially, they
don't accept arguments and can only be short options, i.e. consist of a
single character.

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_NUMBER_CALLBACK</title>
<updated>2009-05-09T07:29:47Z</updated>
<author>
<name>René Scharfe</name>
<email>rene.scharfe@lsrfire.ath.cx</email>
</author>
<published>2009-05-07T19:45:08Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=e0319ff5ed2b7927302389181449dcd029a26622'/>
<id>urn:sha1:e0319ff5ed2b7927302389181449dcd029a26622</id>
<content type='text'>
Add a way to recognize numerical options.  The number is passed to
a callback function as a string.

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>
