<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/parse-options.c, branch v1.6.3</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v1.6.3</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v1.6.3'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2009-03-09T22:32:50Z</updated>
<entry>
<title>parseopt: prevent KEEP_UNKNOWN and STOP_AT_NON_OPTION from being used together</title>
<updated>2009-03-09T22:32:50Z</updated>
<author>
<name>René Scharfe</name>
<email>rene.scharfe@lsrfire.ath.cx</email>
</author>
<published>2009-03-09T20:57:38Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=0d260f9a09a2febeb86fdada7224d271a76d2e3c'/>
<id>urn:sha1:0d260f9a09a2febeb86fdada7224d271a76d2e3c</id>
<content type='text'>
As suggested by Junio, disallow the flags PARSE_OPT_KEEP_UNKNOWN and
PARSE_OPT_STOP_AT_NON_OPTION to be turned on at the same time, as a
value of an unknown option could be mistakenly classified as a
non-option, stopping the parser early.  E.g.:

	git cmd --known --unknown value arg0 arg1

The parser should have stopped at "arg0", but it already stops at
"value".

This patch makes parse_options() die if the two flags are used in
combination.

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: make usage optional</title>
<updated>2009-03-08T20:36:41Z</updated>
<author>
<name>René Scharfe</name>
<email>rene.scharfe@lsrfire.ath.cx</email>
</author>
<published>2009-03-08T18:16:58Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=49b6180252000e37ec47ccb4156240ed625949ed'/>
<id>urn:sha1:49b6180252000e37ec47ccb4156240ed625949ed</id>
<content type='text'>
Allow usagestr to be NULL and don't display any help screen in
this case.  This is useful to implement incremental parsers.

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 PARSE_OPT_NO_INTERNAL_HELP</title>
<updated>2009-03-08T20:36:27Z</updated>
<author>
<name>René Scharfe</name>
<email>rene.scharfe@lsrfire.ath.cx</email>
</author>
<published>2009-03-08T18:15:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b92891f9783ae197bb84b90d8404ad08c3875fa1'/>
<id>urn:sha1:b92891f9783ae197bb84b90d8404ad08c3875fa1</id>
<content type='text'>
Add a parseopt flag, PARSE_OPT_NO_INTERNAL_HELP, that turns off internal
handling of -h, --help and --help-all.  This allows the implementation
of custom help option handlers or incremental parsers.

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 PARSE_OPT_KEEP_UNKNOWN</title>
<updated>2009-03-08T20:36:09Z</updated>
<author>
<name>René Scharfe</name>
<email>rene.scharfe@lsrfire.ath.cx</email>
</author>
<published>2009-03-08T18:12:47Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b5ce3a54302cb6e29a02cd8fe4ea55eacea0a86e'/>
<id>urn:sha1:b5ce3a54302cb6e29a02cd8fe4ea55eacea0a86e</id>
<content type='text'>
Add a parseopt flag, PARSE_OPT_KEEP_UNKNOWN, that can be used to keep
unknown options in argv, similar to the existing KEEP flags.

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>Make opt_parse_with_commit() non-static</title>
<updated>2009-01-28T19:32:27Z</updated>
<author>
<name>Jake Goulding</name>
<email>goulding@vivisimo.com</email>
</author>
<published>2009-01-26T14:13:23Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=269defdf30a4beb48f230e36f20d00ee40348ab6'/>
<id>urn:sha1:269defdf30a4beb48f230e36f20d00ee40348ab6</id>
<content type='text'>
Moving opt_parse_with_commit() from branch to a common location, in
preparation for using it in tag. Rename it to match naming convention
of other option parsing functions.

Signed-off-by: Jake Goulding &lt;goulding@vivisimo.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Teach/Fix pull/fetch -q/-v options</title>
<updated>2008-11-15T01:18:32Z</updated>
<author>
<name>Tuncer Ayaz</name>
<email>tuncer.ayaz@gmail.com</email>
</author>
<published>2008-11-15T00:14:24Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=7f87aff22c0232a5ce327ea3d2923776936c97f4'/>
<id>urn:sha1:7f87aff22c0232a5ce327ea3d2923776936c97f4</id>
<content type='text'>
Implement git-pull --quiet and git-pull --verbose by
adding the options to git-pull and fixing verbosity
handling in git-fetch.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Sync with 1.5.6.5</title>
<updated>2008-08-06T20:50:48Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2008-08-06T20:50:42Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=f44bc33c7283c19a86797ffdaafd22a19bbdfbd6'/>
<id>urn:sha1:f44bc33c7283c19a86797ffdaafd22a19bbdfbd6</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Files given on the command line are relative to $cwd</title>
<updated>2008-08-06T20:38:18Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2008-08-06T18:43:47Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=dbd0f5c7692cce0c5fea535a06622b3a93df9598'/>
<id>urn:sha1:dbd0f5c7692cce0c5fea535a06622b3a93df9598</id>
<content type='text'>
When running "git commit -F file" and "git tag -F file" from a
subdirectory, we should take it as relative to the directory we started
from, not relative to the top-level directory.

This adds a helper function "parse_options_fix_filename()" to make it more
convenient to fix this class of issues.  Ideally, parse_options() should
support a new type of option, "OPT_FILENAME", to do this uniformly, but
this patch is meant to go to 'maint' to fix it minimally.

One thing to note is that value for "commit template file" that comes from
the command line is taken as relative to $cwd just like other parameters,
but when it comes from the configuration varilable 'commit.template', it
is taken as relative to the working tree root as before.  I think this
difference actually is sensible (not that I particularly think
commit.template itself is sensible).

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>parse-options: fix segmentation fault when a required value is missing</title>
<updated>2008-07-22T04:20:04Z</updated>
<author>
<name>Olivier Marin</name>
<email>dkr@freesurf.fr</email>
</author>
<published>2008-07-21T18:30:36Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=d5d745f90b929310f3893bb8b3766cc1745140c8'/>
<id>urn:sha1:d5d745f90b929310f3893bb8b3766cc1745140c8</id>
<content type='text'>
p-&gt;argc represent the number of arguments that have not been parsed yet,
_including_ the one we are currently parsing. If it is not greater than
one then there is no more argument.

Signed-off-by: Olivier Marin &lt;dkr@freesurf.fr&gt;
Acked-by: Pierre Habouzit &lt;madcoder@debian.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>parse-options.c: make check_typos() static</title>
<updated>2008-07-16T15:50:36Z</updated>
<author>
<name>Nanako Shiraishi</name>
<email>nanako3@lavabit.com</email>
</author>
<published>2008-07-16T10:42:18Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=1121a8786e8851cc9d03cb8142c0ecadd17221f6'/>
<id>urn:sha1:1121a8786e8851cc9d03cb8142c0ecadd17221f6</id>
<content type='text'>
This function is not used by any other file.

Signed-off-by: Nanako Shiraishi &lt;nanako3@lavabit.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
