<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/parse-options.c, branch v2.18.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.18.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.18.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2018-04-10T07:28:20Z</updated>
<entry>
<title>Merge branch 'ps/contains-id-error-message'</title>
<updated>2018-04-10T07:28:20Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2018-04-10T07:28:20Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=62c0fd46a875050e904831a73ef4375ed26cfaf6'/>
<id>urn:sha1:62c0fd46a875050e904831a73ef4375ed26cfaf6</id>
<content type='text'>
"git tag --contains no-such-commit" gave a full list of options
after giving an error message.

* ps/contains-id-error-message:
  parse-options: do not show usage upon invalid option value
</content>
</entry>
<entry>
<title>parse-options: do not show usage upon invalid option value</title>
<updated>2018-03-22T19:10:08Z</updated>
<author>
<name>Paul-Sebastian Ungureanu</name>
<email>ungureanupaulsebastian@gmail.com</email>
</author>
<published>2018-03-22T18:43:51Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=3bb0923f06c55ea44569f547cefa9e1a59069ff2'/>
<id>urn:sha1:3bb0923f06c55ea44569f547cefa9e1a59069ff2</id>
<content type='text'>
Usually, the usage should be shown only if the user does not know what
options are available. If the user specifies an invalid value, the user
is already aware of the available options. In this case, there is no
point in displaying the usage anymore.

This patch applies to "git tag --contains", "git branch --contains",
"git branch --points-at", "git for-each-ref --contains" and many more.

Signed-off-by: Paul-Sebastian Ungureanu &lt;ungureanupaulsebastian@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'nd/parseopt-completion'</title>
<updated>2018-03-14T19:01:07Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2018-03-14T19:01:06Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=7fb6aefd2aaffe66e614f7f7b83e5b7ab16d4806'/>
<id>urn:sha1:7fb6aefd2aaffe66e614f7f7b83e5b7ab16d4806</id>
<content type='text'>
Teach parse-options API an option to help the completion script,
and make use of the mechanism in command line completion.

* nd/parseopt-completion: (45 commits)
  completion: more subcommands in _git_notes()
  completion: complete --{reuse,reedit}-message= for all notes subcmds
  completion: simplify _git_notes
  completion: don't set PARSE_OPT_NOCOMPLETE on --rerere-autoupdate
  completion: use __gitcomp_builtin in _git_worktree
  completion: use __gitcomp_builtin in _git_tag
  completion: use __gitcomp_builtin in _git_status
  completion: use __gitcomp_builtin in _git_show_branch
  completion: use __gitcomp_builtin in _git_rm
  completion: use __gitcomp_builtin in _git_revert
  completion: use __gitcomp_builtin in _git_reset
  completion: use __gitcomp_builtin in _git_replace
  remote: force completing --mirror= instead of --mirror
  completion: use __gitcomp_builtin in _git_remote
  completion: use __gitcomp_builtin in _git_push
  completion: use __gitcomp_builtin in _git_pull
  completion: use __gitcomp_builtin in _git_notes
  completion: use __gitcomp_builtin in _git_name_rev
  completion: use __gitcomp_builtin in _git_mv
  completion: use __gitcomp_builtin in _git_merge_base
  ...
</content>
</entry>
<entry>
<title>remote: force completing --mirror= instead of --mirror</title>
<updated>2018-02-09T18:24:52Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2018-02-09T11:02:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ebc4a04e8437e704e40a1d35aea030dc03ec8e56'/>
<id>urn:sha1:ebc4a04e8437e704e40a1d35aea030dc03ec8e56</id>
<content type='text'>
"git remote --mirror" is a special case. Technically it is possible to
specify --mirror without any argument. But we will get a "dangerous,
deprecated!" warning in that case.

This new parse-opt flag allows --git-completion-helper to always
complete --mirror=, ignoring the dangerous use case.

Signed-off-by: Nguyễn Thái Ngọc Duy &lt;pclouds@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>parse-options: support --git-completion-helper</title>
<updated>2018-02-09T18:24:49Z</updated>
<author>
<name>Nguyễn Thái Ngọc Duy</name>
<email>pclouds@gmail.com</email>
</author>
<published>2018-02-09T11:01:40Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b9d7f4b4dbebea34ca8d02be8889884fc3fb90c7'/>
<id>urn:sha1:b9d7f4b4dbebea34ca8d02be8889884fc3fb90c7</id>
<content type='text'>
This option is designed to be used by git-completion.bash. For many
simple cases, what we do in there is usually

    __gitcomp "lots of completion options"

which has to be manually updated when a new user-visible option is
added. With support from parse-options, we can write

    __gitcomp "$(git command --git-completion-helper)"

and get that list directly from the parser for free. Dangerous/Unpopular
options could be hidden with the new "NOCOMPLETE" flag.

Signed-off-by: Nguyễn Thái Ngọc Duy &lt;pclouds@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Use MOVE_ARRAY</title>
<updated>2018-01-22T19:32:51Z</updated>
<author>
<name>SZEDER Gábor</name>
<email>szeder.dev@gmail.com</email>
</author>
<published>2018-01-22T17:50:09Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=f919ffebed3c570bf3c2a5f36444527ea5df42de'/>
<id>urn:sha1:f919ffebed3c570bf3c2a5f36444527ea5df42de</id>
<content type='text'>
Use the helper macro MOVE_ARRAY to move arrays.  This is shorter and
safer, as it automatically infers the size of elements.

Patch generated by Coccinelle and contrib/coccinelle/array.cocci in
Travis CI's static analysis build job.

Signed-off-by: SZEDER Gábor &lt;szeder.dev@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>parse-options: only insert newline in help text if needed</title>
<updated>2017-09-25T05:35:53Z</updated>
<author>
<name>Brandon Casey</name>
<email>drafnel@gmail.com</email>
</author>
<published>2017-09-25T04:08:05Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=a6304fa4c2f57b08ec0acea9f91c188f284f8374'/>
<id>urn:sha1:a6304fa4c2f57b08ec0acea9f91c188f284f8374</id>
<content type='text'>
Currently, when parse_options() produces a help message it always emits
a blank line after the usage text to separate it from the options text.
If the option spec does not define any switches, or only defines hidden
switches that will not be displayed, then the help text will end up with
two trailing blank lines instead of one.  Let's defer emitting the blank
line between the usage text and the options text until it is clear that
the options section will not be empty.

Fixes t1502.5, t1502.6.

Signed-off-by: Brandon Casey &lt;drafnel@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>parse-options: write blank line to correct output stream</title>
<updated>2017-09-25T05:35:52Z</updated>
<author>
<name>Brandon Casey</name>
<email>drafnel@gmail.com</email>
</author>
<published>2017-09-25T04:08:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=1a9bf1e176439d415b97fb8c5a556f69ea503877'/>
<id>urn:sha1:1a9bf1e176439d415b97fb8c5a556f69ea503877</id>
<content type='text'>
When commit 54e6dc7 added translation support to parse-options, an
fprintf was mistakenly replaced by a call to putchar().  Let's use fputc
instead.

Fixes t0040.11, t0040.12, t0040.33, and t1502.8.

Signed-off-by: Brandon Casey &lt;drafnel@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'bw/config-h'</title>
<updated>2017-06-24T21:28:41Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2017-06-24T21:28:40Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=f31d23a399d557d687266b4375a0436f920cc051'/>
<id>urn:sha1:f31d23a399d557d687266b4375a0436f920cc051</id>
<content type='text'>
Fix configuration codepath to pay proper attention to commondir
that is used in multi-worktree situation, and isolate config API
into its own header file.

* bw/config-h:
  config: don't implicitly use gitdir or commondir
  config: respect commondir
  setup: teach discover_git_directory to respect the commondir
  config: don't include config.h by default
  config: remove git_config_iter
  config: create config.h
</content>
</entry>
<entry>
<title>config: don't include config.h by default</title>
<updated>2017-06-15T19:56:22Z</updated>
<author>
<name>Brandon Williams</name>
<email>bmwill@google.com</email>
</author>
<published>2017-06-14T18:07:36Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b2141fc1d20e659810245ec6ca1c143c60e033ec'/>
<id>urn:sha1:b2141fc1d20e659810245ec6ca1c143c60e033ec</id>
<content type='text'>
Stop including config.h by default in cache.h.  Instead only include
config.h in those files which require use of the config system.

Signed-off-by: Brandon Williams &lt;bmwill@google.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
