<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/commit.c, branch v2.9.4</title>
<subtitle>Fork of git SCM with my patches.</subtitle>
<id>http://git.kilabit.info/git/atom?h=v2.9.4</id>
<link rel='self' href='http://git.kilabit.info/git/atom?h=v2.9.4'/>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/'/>
<updated>2016-08-14T02:48:07Z</updated>
<entry>
<title>commit: use FLEX_ARRAY in struct merge_remote_desc</title>
<updated>2016-08-14T02:48:07Z</updated>
<author>
<name>René Scharfe</name>
<email>l.s.r@web.de</email>
</author>
<published>2016-08-13T12:21:27Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=5447a76aad4074c31e7c8a6299cc586435f385e9'/>
<id>urn:sha1:5447a76aad4074c31e7c8a6299cc586435f385e9</id>
<content type='text'>
Convert the name member of struct merge_remote_desc to a FLEX_ARRAY and
use FLEX_ALLOC_STR to build the struct.  This halves the number of
memory allocations, saves the storage for a pointer and avoids an
indirection when reading the name.

Suggested-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Rene Scharfe &lt;l.s.r@web.de&gt;
Reviewed-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>commit: factor out set_merge_remote_desc()</title>
<updated>2016-08-14T02:48:00Z</updated>
<author>
<name>René Scharfe</name>
<email>l.s.r@web.de</email>
</author>
<published>2016-08-13T12:11:27Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=beb518c9850f459a71a2cb9e1d36e677528a55c0'/>
<id>urn:sha1:beb518c9850f459a71a2cb9e1d36e677528a55c0</id>
<content type='text'>
Export a helper function for allocating, populating and attaching a
merge_remote_desc to a commit.

Signed-off-by: Rene Scharfe &lt;l.s.r@web.de&gt;
Reviewed-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>commit: use xstrdup() in get_merge_parent()</title>
<updated>2016-08-14T02:47:49Z</updated>
<author>
<name>René Scharfe</name>
<email>l.s.r@web.de</email>
</author>
<published>2016-08-13T12:09:49Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=c089320cf616d7817a0662d3963ae8ea0c4bc62d'/>
<id>urn:sha1:c089320cf616d7817a0662d3963ae8ea0c4bc62d</id>
<content type='text'>
Handle allocation errors for the name member just like we already do
for the struct merge_remote_desc itself.

Signed-off-by: Rene Scharfe &lt;l.s.r@web.de&gt;
Reviewed-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 'js/sign-empty-commit-fix' into maint</title>
<updated>2016-07-28T18:25:53Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2016-07-28T18:25:53Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=475495ff5e071c895dca772cb59e277ceff84d84'/>
<id>urn:sha1:475495ff5e071c895dca772cb59e277ceff84d84</id>
<content type='text'>
"git commit --amend --allow-empty-message -S" for a commit without
any message body could have misidentified where the header of the
commit object ends.

* js/sign-empty-commit-fix:
  commit -S: avoid invalid pointer with empty message
</content>
</entry>
<entry>
<title>Merge branch 'js/find-commit-subject-ignore-leading-blanks' into maint</title>
<updated>2016-07-28T18:25:50Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2016-07-28T18:25:50Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=4966b58f3e1f295e3fb22560006b1db717b56f37'/>
<id>urn:sha1:4966b58f3e1f295e3fb22560006b1db717b56f37</id>
<content type='text'>
A helper function that takes the contents of a commit object and
finds its subject line did not ignore leading blank lines, as is
commonly done by other codepaths.  Make it ignore leading blank
lines to match.

* js/find-commit-subject-ignore-leading-blanks:
  reset --hard: skip blank lines when reporting the commit subject
  sequencer: use skip_blank_lines() to find the commit subject
  commit -C: skip blank lines at the beginning of the message
  commit.c: make find_commit_subject() more robust
  pretty: make the skip_blank_lines() function public
</content>
</entry>
<entry>
<title>commit -S: avoid invalid pointer with empty message</title>
<updated>2016-06-29T22:07:02Z</updated>
<author>
<name>Johannes Schindelin</name>
<email>johannes.schindelin@gmx.de</email>
</author>
<published>2016-06-29T14:14:54Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=3324dd8f267cb59cdd42ac33727b6844921d5017'/>
<id>urn:sha1:3324dd8f267cb59cdd42ac33727b6844921d5017</id>
<content type='text'>
While it is not recommended, fsck.c says:

	Not having a body is not a crime [...]

... which means that we cannot assume that the commit buffer
contains an empty line to separate header from body.  A commit
object with only a header without any body, not even without
a blank line after the header, is valid.

So let's tread carefully here.  strstr("\n\n") may find nothing
and return NULL.

Signed-off-by: Johannes Schindelin &lt;johannes.schindelin@gmx.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>commit.c: make find_commit_subject() more robust</title>
<updated>2016-06-22T20:24:17Z</updated>
<author>
<name>Johannes Schindelin</name>
<email>johannes.schindelin@gmx.de</email>
</author>
<published>2016-06-22T20:20:20Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=4e1b06da252a7609f0c6641750e6acbec451e698'/>
<id>urn:sha1:4e1b06da252a7609f0c6641750e6acbec451e698</id>
<content type='text'>
Just like the pretty printing machinery, we should simply ignore
blank lines at the beginning of the commit messages.

This discrepancy was noticed when an early version of the
rebase--helper produced commit objects with more than one empty line
between the header and the commit message.

Signed-off-by: Johannes Schindelin &lt;johannes.schindelin@gmx.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>use st_add and st_mult for allocation size computation</title>
<updated>2016-02-22T22:51:09Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2016-02-22T22:44:35Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=50a6c8efa2bbeddf46ca34c7765024108202e04b'/>
<id>urn:sha1:50a6c8efa2bbeddf46ca34c7765024108202e04b</id>
<content type='text'>
If our size computation overflows size_t, we may allocate a
much smaller buffer than we expected and overflow it. It's
probably impossible to trigger an overflow in most of these
sites in practice, but it is easy enough convert their
additions and multiplications into overflow-checking
variants. This may be fixing real bugs, and it makes
auditing the code easier.

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>convert trivial cases to ALLOC_ARRAY</title>
<updated>2016-02-22T22:51:09Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2016-02-22T22:44:25Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=b32fa95fd8293ebfecb2b7b6c8d460579318f9fe'/>
<id>urn:sha1:b32fa95fd8293ebfecb2b7b6c8d460579318f9fe</id>
<content type='text'>
Each of these cases can be converted to use ALLOC_ARRAY or
REALLOC_ARRAY, which has two advantages:

  1. It automatically checks the array-size multiplication
     for overflow.

  2. It always uses sizeof(*array) for the element-size,
     so that it can never go out of sync with the declared
     type of the 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 'rs/pop-commit' into maint</title>
<updated>2015-12-11T19:14:13Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2015-12-11T19:14:12Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=0af22d6fffe5169f641fb9815468ae97e47cd73f'/>
<id>urn:sha1:0af22d6fffe5169f641fb9815468ae97e47cd73f</id>
<content type='text'>
Code simplification.

* rs/pop-commit:
  use pop_commit() for consuming the first entry of a struct commit_list
</content>
</entry>
</feed>
