<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/parse-options.h, branch v2.12.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.12.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.12.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2016-09-26T23:09:16Z</updated>
<entry>
<title>Merge branch 'mh/diff-indent-heuristic'</title>
<updated>2016-09-26T23:09:16Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2016-09-26T23:09:16Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=b7af6ae5cff8439fdf5b72f926cab2e614906af3'/>
<id>urn:sha1:b7af6ae5cff8439fdf5b72f926cab2e614906af3</id>
<content type='text'>
Output from "git diff" can be made easier to read by selecting
which lines are common and which lines are added/deleted
intelligently when the lines before and after the changed section
are the same.  A command line option is added to help with the
experiment to find a good heuristics.

* mh/diff-indent-heuristic:
  blame: honor the diff heuristic options and config
  parse-options: add parse_opt_unknown_cb()
  diff: improve positioning of add/delete blocks in diffs
  xdl_change_compact(): introduce the concept of a change group
  recs_match(): take two xrecord_t pointers as arguments
  is_blank_line(): take a single xrecord_t as argument
  xdl_change_compact(): only use heuristic if group can't be matched
  xdl_change_compact(): fix compaction heuristic to adjust ixo
</content>
</entry>
<entry>
<title>parse-options: add parse_opt_unknown_cb()</title>
<updated>2016-09-19T17:25:11Z</updated>
<author>
<name>Michael Haggerty</name>
<email>mhagger@alum.mit.edu</email>
</author>
<published>2016-09-05T09:44:52Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=ce564eb1bd541a87152e3546fb7d7a2b460df7ed'/>
<id>urn:sha1:ce564eb1bd541a87152e3546fb7d7a2b460df7ed</id>
<content type='text'>
Add a new callback function, parse_opt_unknown_cb(), which returns -2 to
indicate that the corresponding option is unknown. This can be used to
add "-h" documentation for an option that will be handled externally to
parse_options().

Signed-off-by: Michael Haggerty &lt;mhagger@alum.mit.edu&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<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>parse-options: allow -h as a short option</title>
<updated>2015-11-20T13:02:07Z</updated>
<author>
<name>René Scharfe</name>
<email>l.s.r@web.de</email>
</author>
<published>2015-11-17T10:25:38Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=5ad0d3d5266b83aa767a7efa09cb574d3c2968b3'/>
<id>urn:sha1:5ad0d3d5266b83aa767a7efa09cb574d3c2968b3</id>
<content type='text'>
Let callers provide their own handler for the short option -h even
without the flag PARSE_OPT_NO_INTERNAL_HELP, but call the internal
handler (showing usage information) if that is the only parameter.
Implement the first part by checking for -h only if parse_short_opt()
can't find it and returns -2.

Signed-off-by: Rene Scharfe &lt;l.s.r@web.de&gt;
Signed-off-by: Jeff King &lt;peff@peff.net&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>Merge branch 'sb/parse-options-codeformat'</title>
<updated>2015-08-12T21:09:57Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2015-08-12T21:09:57Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=535efaf6beb039b9f3b6f6c0f2b526eb8d02f99b'/>
<id>urn:sha1:535efaf6beb039b9f3b6f6c0f2b526eb8d02f99b</id>
<content type='text'>
* sb/parse-options-codeformat:
  parse-options: align curly braces for all options
</content>
</entry>
<entry>
<title>Merge branch 'pt/pull-builtin'</title>
<updated>2015-08-03T18:01:17Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2015-08-03T18:01:17Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=5f02274e4c4506b923b510a24da7991656f4db14'/>
<id>urn:sha1:5f02274e4c4506b923b510a24da7991656f4db14</id>
<content type='text'>
Reimplement 'git pull' in C.

* pt/pull-builtin:
  pull: remove redirection to git-pull.sh
  pull --rebase: error on no merge candidate cases
  pull --rebase: exit early when the working directory is dirty
  pull: configure --rebase via branch.&lt;name&gt;.rebase or pull.rebase
  pull: teach git pull about --rebase
  pull: set reflog message
  pull: implement pulling into an unborn branch
  pull: fast-forward working tree if head is updated
  pull: check if in unresolved merge state
  pull: support pull.ff config
  pull: error on no merge candidates
  pull: pass git-fetch's options to git-fetch
  pull: pass git-merge's options to git-merge
  pull: pass verbosity, --progress flags to fetch and merge
  pull: implement fetch + merge
  pull: implement skeletal builtin pull
  argv-array: implement argv_array_pushv()
  parse-options-cb: implement parse_opt_passthru_argv()
  parse-options-cb: implement parse_opt_passthru()
</content>
</entry>
<entry>
<title>parse-options.h: add macros for '--contains' option</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:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=f266c9163b34ec55e453d27e1ed246d67ee3ced0'/>
<id>urn:sha1:f266c9163b34ec55e453d27e1ed246d67ee3ced0</id>
<content type='text'>
Add a macro for using the '--contains' option in parse-options.h
also include an optional '--with' option macro which performs the
same action as '--contains'.

Make tag.c and branch.c use this new macro.

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-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>
</feed>
