<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/parse-options-cb.c, branch v2.13.2</title>
<subtitle>Mirror of https://git.kernel.org/pub/scm/git/git.git/
</subtitle>
<id>https://git.shady.money/git/atom?h=v2.13.2</id>
<link rel='self' href='https://git.shady.money/git/atom?h=v2.13.2'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/'/>
<updated>2017-03-31T15:33:56Z</updated>
<entry>
<title>Rename sha1_array to oid_array</title>
<updated>2017-03-31T15:33:56Z</updated>
<author>
<name>brian m. carlson</name>
<email>sandals@crustytoothpaste.net</email>
</author>
<published>2017-03-31T01:40:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=910650d2f8755359ab7b1f0e2a2d576c06a68091'/>
<id>urn:sha1:910650d2f8755359ab7b1f0e2a2d576c06a68091</id>
<content type='text'>
Since this structure handles an array of object IDs, rename it to struct
oid_array.  Also rename the accessor functions and the initialization
constant.

This commit was produced mechanically by providing non-Documentation
files to the following Perl one-liners:

    perl -pi -E 's/struct sha1_array/struct oid_array/g'
    perl -pi -E 's/\bsha1_array_/oid_array_/g'
    perl -pi -E 's/SHA1_ARRAY_INIT/OID_ARRAY_INIT/g'

Signed-off-by: brian m. carlson &lt;sandals@crustytoothpaste.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Make sha1_array_append take a struct object_id *</title>
<updated>2017-03-31T15:33:55Z</updated>
<author>
<name>brian m. carlson</name>
<email>sandals@crustytoothpaste.net</email>
</author>
<published>2017-03-31T01:39:56Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=98a72ddc12e13231537150607f4a6a8ff8b43854'/>
<id>urn:sha1:98a72ddc12e13231537150607f4a6a8ff8b43854</id>
<content type='text'>
Convert the callers to pass struct object_id by changing the function
declaration and definition and applying the following semantic patch:

@@
expression E1, E2;
@@
- sha1_array_append(E1, E2.hash)
+ sha1_array_append(E1, &amp;E2)

@@
expression E1, E2;
@@
- sha1_array_append(E1, E2-&gt;hash)
+ sha1_array_append(E1, E2)

Signed-off-by: brian m. carlson &lt;sandals@crustytoothpaste.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>parse-options-cb: convert sha1_array_append caller to struct object_id</title>
<updated>2017-03-28T16:59:33Z</updated>
<author>
<name>brian m. carlson</name>
<email>sandals@crustytoothpaste.net</email>
</author>
<published>2017-03-26T16:01:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=9e1d7087dcf0f6e7056f4536c3c750cf6cfe37a4'/>
<id>urn:sha1:9e1d7087dcf0f6e7056f4536c3c750cf6cfe37a4</id>
<content type='text'>
Signed-off-by: brian m. carlson &lt;sandals@crustytoothpaste.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'rs/cocci'</title>
<updated>2016-10-17T20:25:21Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2016-10-17T20:25:21Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=69e6544998892a2bd3c785cd238c786da40cf6a3'/>
<id>urn:sha1:69e6544998892a2bd3c785cd238c786da40cf6a3</id>
<content type='text'>
Code cleanup.

* rs/cocci:
  use strbuf_add_unique_abbrev() for adding short hashes, part 3
  remove unnecessary NULL check before free(3)
</content>
</entry>
<entry>
<title>remove unnecessary NULL check before free(3)</title>
<updated>2016-10-10T18:37:41Z</updated>
<author>
<name>René Scharfe</name>
<email>l.s.r@web.de</email>
</author>
<published>2016-10-08T14:14:57Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=39ea59a2570547166834ceeff9ae0c0c05748f35'/>
<id>urn:sha1:39ea59a2570547166834ceeff9ae0c0c05748f35</id>
<content type='text'>
free(3) handles NULL pointers just fine.  Add a semantic patch for
removing unnecessary NULL checks before calling this function, and
apply it on the code base.

Signed-off-by: Rene Scharfe &lt;l.s.r@web.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<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>Merge branch 'jk/parse-options-concat'</title>
<updated>2016-08-03T22:10:25Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2016-08-03T22:10:25Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=d083d420b7d24a57cfd32af71100ae4c887f3a39'/>
<id>urn:sha1:d083d420b7d24a57cfd32af71100ae4c887f3a39</id>
<content type='text'>
Users of the parse_options_concat() API function need to allocate
extra slots in advance and fill them with OPT_END() when they want
to decide the set of supported options dynamically, which makes the
code error-prone and hard to read.  This has been corrected by tweaking
the API to allocate and return a new copy of "struct option" array.

* jk/parse-options-concat:
  parse_options: allocate a new array when concatenating
</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>Merge branch 'jk/parseopt-string-list' into jk/string-list-static-init</title>
<updated>2016-06-13T17:37:48Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2016-06-13T17:37:48Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/git/commit/?id=7013220d2b3181d4ae55e21e0f18b9abfd6e011d'/>
<id>urn:sha1:7013220d2b3181d4ae55e21e0f18b9abfd6e011d</id>
<content type='text'>
* jk/parseopt-string-list:
  blame,shortlog: don't make local option variables static
  interpret-trailers: don't duplicate option strings
  parse_opt_string_list: stop allocating new strings
</content>
</entry>
</feed>
