<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/parse-options-cb.c, branch v2.9.3</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.9.3</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.9.3'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2016-07-06T17:11:08Z</updated>
<entry>
<title>parse_options: allocate a new array when concatenating</title>
<updated>2016-07-06T17:11:08Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2016-07-05T20:44:47Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=023ff39b2994804e4a7b2274b22336bdb37d4a54'/>
<id>urn:sha1:023ff39b2994804e4a7b2274b22336bdb37d4a54</id>
<content type='text'>
In exactly one callers (builtin/revert.c), we build up the
options list dynamically from multiple arrays. We do so by
manually inserting "filler" entries into one array, and then
copying the other array into the allocated space.

This is tedious and error-prone, as you have to adjust the
filler any time the second array is modified (although we do
at least check and die() when the counts do not match up).

Instead, let's just allocate a new array.

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 'kn/for-each-tag-branch'</title>
<updated>2015-10-05T19:30:03Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2015-10-05T19:30:02Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=9958dd8685a0a8b3d6ecdd07e35d8ecb22b304a7'/>
<id>urn:sha1:9958dd8685a0a8b3d6ecdd07e35d8ecb22b304a7</id>
<content type='text'>
Some features from "git tag -l" and "git branch -l" have been made
available to "git for-each-ref" so that eventually the unified
implementation can be shared across all three, in a follow-up
series or two.

* kn/for-each-tag-branch:
  for-each-ref: add '--contains' option
  ref-filter: implement '--contains' option
  parse-options.h: add macros for '--contains' option
  parse-option: rename parse_opt_with_commit()
  for-each-ref: add '--merged' and '--no-merged' options
  ref-filter: implement '--merged' and '--no-merged' options
  ref-filter: add parse_opt_merge_filter()
  for-each-ref: add '--points-at' option
  ref-filter: implement '--points-at' option
  tag: libify parse_opt_points_at()
  t6302: for-each-ref tests for ref-filter APIs
</content>
</entry>
<entry>
<title>parse-option: rename parse_opt_with_commit()</title>
<updated>2015-08-03T17:25:28Z</updated>
<author>
<name>Karthik Nayak</name>
<email>karthik.188@gmail.com</email>
</author>
<published>2015-07-07T16:06:14Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=9d306b5a6077f026291df3c4a5968eaf95a92417'/>
<id>urn:sha1:9d306b5a6077f026291df3c4a5968eaf95a92417</id>
<content type='text'>
Rename parse_opt_with_commit() to parse_opt_commits() to show
that it can be used to obtain a list of commits and is not
constricted to usage of '--contains' option.

Mentored-by: Christian Couder &lt;christian.couder@gmail.com&gt;
Mentored-by: Matthieu Moy &lt;matthieu.moy@grenoble-inp.fr&gt;
Signed-off-by: Karthik Nayak &lt;karthik.188@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>tag: libify parse_opt_points_at()</title>
<updated>2015-08-03T17:25:27Z</updated>
<author>
<name>Karthik Nayak</name>
<email>karthik.188@gmail.com</email>
</author>
<published>2015-07-07T16:06:08Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b2172fdf702426cb4eba093b5504d0a0e9e59746'/>
<id>urn:sha1:b2172fdf702426cb4eba093b5504d0a0e9e59746</id>
<content type='text'>
Rename 'parse_opt_points_at()' to 'parse_opt_object_name()' and
move it from 'tag.c' to 'parse-options'. This now acts as a common
parse_opt function which accepts an objectname and stores it into
a sha1_array.

Based-on-patch-by: Jeff King &lt;peff@peff.net&gt;
Mentored-by: Christian Couder &lt;christian.couder@gmail.com&gt;
Mentored-by: Matthieu Moy &lt;matthieu.moy@grenoble-inp.fr&gt;
Signed-off-by: Karthik Nayak &lt;karthik.188@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>parse-options-cb: implement parse_opt_passthru_argv()</title>
<updated>2015-06-15T19:40:49Z</updated>
<author>
<name>Paul Tan</name>
<email>pyokagan@gmail.com</email>
</author>
<published>2015-06-14T08:41:49Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ffad85c599307441323de565c3fafde227e04a8f'/>
<id>urn:sha1:ffad85c599307441323de565c3fafde227e04a8f</id>
<content type='text'>
Certain git commands, such as git-pull, are simply wrappers around other
git commands like git-fetch, git-merge and git-rebase. As such, these
wrapper commands will typically need to "pass through" command-line
options of the commands they wrap.

Implement the parse_opt_passthru_argv() parse-options callback, which
will reconstruct all the provided command-line options into an
argv_array, such that it can be passed to another git command. This is
useful for passing command-line options that can be specified multiple
times.

Helped-by: Stefan Beller &lt;sbeller@google.com&gt;
Signed-off-by: Paul Tan &lt;pyokagan@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>parse-options-cb: implement parse_opt_passthru()</title>
<updated>2015-06-15T19:40:49Z</updated>
<author>
<name>Paul Tan</name>
<email>pyokagan@gmail.com</email>
</author>
<published>2015-06-14T08:41:48Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=6b3ee18dc5c620d7cb4324e009339b5ca9ac488c'/>
<id>urn:sha1:6b3ee18dc5c620d7cb4324e009339b5ca9ac488c</id>
<content type='text'>
Certain git commands, such as git-pull, are simply wrappers around other
git commands like git-fetch, git-merge and git-rebase. As such, these
wrapper commands will typically need to "pass through" command-line
options of the commands they wrap.

Implement the parse_opt_passthru() parse-options callback, which will
reconstruct the command-line option into an char* string, such that it
can be passed to another git command.

Helped-by: Johannes Schindelin &lt;johannes.schindelin@gmx.de&gt;
Helped-by: Junio C Hamano &lt;gitster@pobox.com&gt;
Helped-by: Stefan Beller &lt;sbeller@google.com&gt;
Signed-off-by: Paul Tan &lt;pyokagan@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>prune: introduce OPT_EXPIRY_DATE() and use it</title>
<updated>2013-04-25T18:42:10Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2013-04-25T18:13:49Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=27ec394a9701675762f02e9af464be2c297c6cf1'/>
<id>urn:sha1:27ec394a9701675762f02e9af464be2c297c6cf1</id>
<content type='text'>
Earlier we added support for --expire=all (or --expire=now) that
considers all crufts, regardless of their age, as eligible for
garbage collection by turning command argument parsers that use
approxidate() to use parse_expiry_date(), but "git prune" used a
built-in parse-options facility OPT_DATE() and did not benefit from
the new function.

Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>parseopt: add OPT_NOOP_NOARG</title>
<updated>2011-09-28T19:46:21Z</updated>
<author>
<name>René Scharfe</name>
<email>rene.scharfe@lsrfire.ath.cx</email>
</author>
<published>2011-09-28T17:44:30Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=6acec0380bfcd5e3f91c9100bf4d415db8f7acfd'/>
<id>urn:sha1:6acec0380bfcd5e3f91c9100bf4d415db8f7acfd</id>
<content type='text'>
Add OPT_NOOP_NOARG, a helper macro to define deprecated options in a
standard way.  The help text is taken from the no-op option -r of
git revert.

The callback could be made to emit a (conditional?) warning later.  And
we could also add OPT_NOOP (requiring an argument) etc. as needed.

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>Merge branch 'jk/color-and-pager'</title>
<updated>2011-08-29T04:19:16Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2011-08-29T04:19:16Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=f946b465d7fa13a235dd5653d37c7babb1ceb233'/>
<id>urn:sha1:f946b465d7fa13a235dd5653d37c7babb1ceb233</id>
<content type='text'>
* jk/color-and-pager:
  want_color: automatically fallback to color.ui
  diff: don't load color config in plumbing
  config: refactor get_colorbool function
  color: delay auto-color decision until point of use
  git_config_colorbool: refactor stdout_is_tty handling
  diff: refactor COLOR_DIFF from a flag into an int
  setup_pager: set GIT_PAGER_IN_USE
  t7006: use test_config helpers
  test-lib: add helper functions for config
  t7006: modernize calls to unset

Conflicts:
	builtin/commit.c
	parse-options.c
</content>
</entry>
<entry>
<title>Reduce parse-options.o dependencies</title>
<updated>2011-08-11T19:18:02Z</updated>
<author>
<name>Dmitry Ivankov</name>
<email>divanorama@gmail.com</email>
</author>
<published>2011-08-11T09:15:38Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=068762846634dff73a18d71188736e0ded03a1cc'/>
<id>urn:sha1:068762846634dff73a18d71188736e0ded03a1cc</id>
<content type='text'>
Currently parse-options.o pulls quite a big bunch of dependencies.
his complicates it's usage in contrib/ because it pulls external
dependencies and it also increases executables size.

Split off less generic and more internal to git part of
parse-options.c to parse-options-cb.c.

Move prefix_filename function from setup.c to abspath.c. abspath.o
and wrapper.o pull each other, so it's unlikely to increase the
dependencies. It was a dependency of parse-options.o that pulled
many others.

Now parse-options.o pulls just abspath.o, ctype.o, strbuf.o, usage.o,
wrapper.o, libc directly and strlcpy.o indirectly.

Signed-off-by: Dmitry Ivankov &lt;divanorama@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
