<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/libgit2.git/src/commit.c, branch bindings/libgit2sharp/020_2</title>
<subtitle>github.com: libgit2/libgit2.git
</subtitle>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/libgit2.git/'/>
<entry>
<title>git_rebase_commit: write HEAD's reflog appropriately</title>
<updated>2014-10-27T02:59:27+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@edwardthomson.com</email>
</author>
<published>2014-07-18T22:22:54+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/libgit2.git/commit/?id=a612a25fa673447e874407fd2d9501998885d392'/>
<id>a612a25fa673447e874407fd2d9501998885d392</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>commit: safer commit creation with reference update</title>
<updated>2014-04-29T22:41:37+00:00</updated>
<author>
<name>Carlos Martín Nieto</name>
<email>cmn@dwim.me</email>
</author>
<published>2014-04-09T12:08:22+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/libgit2.git/commit/?id=217c029b54e8f1574ae6bc71c4b25533ecff3b6a'/>
<id>217c029b54e8f1574ae6bc71c4b25533ecff3b6a</id>
<content type='text'>
The current version of the commit creation and amend function are unsafe
to use when passing the update_ref parameter, as they do not check that
the reference at the moment of update points to what the user expects.

Make sure that we're moving history forward when we ask the library to
update the reference for us by checking that the first parent of the new
commit is the current value of the reference. We also make sure that the
ref we're updating hasn't moved between the read and the write.

Similarly, when amending a commit, make sure that the current tip of the
branch is the commit we're amending.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The current version of the commit creation and amend function are unsafe
to use when passing the update_ref parameter, as they do not check that
the reference at the moment of update points to what the user expects.

Make sure that we're moving history forward when we ask the library to
update the reference for us by checking that the first parent of the new
commit is the current value of the reference. We also make sure that the
ref we're updating hasn't moved between the read and the write.

Similarly, when amending a commit, make sure that the current tip of the
branch is the commit we're amending.
</pre>
</div>
</content>
</entry>
<entry>
<title>commit: simplify and correct refcounting in nth_gen_ancestor</title>
<updated>2014-03-07T15:03:10+00:00</updated>
<author>
<name>Carlos Martín Nieto</name>
<email>cmn@dwim.me</email>
</author>
<published>2014-03-07T14:17:08+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/libgit2.git/commit/?id=7c1ee212b7fa1568a12a0a656b02cae01cb1cb6c'/>
<id>7c1ee212b7fa1568a12a0a656b02cae01cb1cb6c</id>
<content type='text'>
We can make use of git_object_dup to use refcounting instead of pointer
comparison to make sure we don't free the caller's object.

This also lets us simplify the case for '~0' which is now just an
assignment instead of looking up the object we have at hand.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We can make use of git_object_dup to use refcounting instead of pointer
comparison to make sure we don't free the caller's object.

This also lets us simplify the case for '~0' which is now just an
assignment instead of looking up the object we have at hand.
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove now-duplicated stdarg.h include</title>
<updated>2014-02-25T07:32:25+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@microsoft.com</email>
</author>
<published>2014-02-25T07:32:25+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/libgit2.git/commit/?id=4f46a98b6e419bd98765e18ce7fc64e3562dbd09'/>
<id>4f46a98b6e419bd98765e18ce7fc64e3562dbd09</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Add git_commit_amend API</title>
<updated>2014-02-08T00:17:59+00:00</updated>
<author>
<name>Russell Belfer</name>
<email>rb@github.com</email>
</author>
<published>2014-01-17T18:45:11+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/libgit2.git/commit/?id=80c29fe93e968fd73e861546e1a4cf33b514e3f6'/>
<id>80c29fe93e968fd73e861546e1a4cf33b514e3f6</id>
<content type='text'>
This adds an API to amend an existing commit, basically a shorthand
for creating a new commit filling in missing parameters from the
values of an existing commit.  As part of this, I also added a new
"sys" API to create a commit using a callback to get the parents.
This allowed me to rewrite all the other commit creation APIs so
that temporary allocations are no longer needed.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This adds an API to amend an existing commit, basically a shorthand
for creating a new commit filling in missing parameters from the
values of an existing commit.  As part of this, I also added a new
"sys" API to create a commit using a callback to get the parents.
This allowed me to rewrite all the other commit creation APIs so
that temporary allocations are no longer needed.
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge remote-tracking branch 'libgit2/development' into bs/more-reflog-stuff</title>
<updated>2014-02-05T21:15:57+00:00</updated>
<author>
<name>Ben Straub</name>
<email>bs@github.com</email>
</author>
<published>2014-02-05T21:15:57+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/libgit2.git/commit/?id=0de2c4e3a3cb63a2af66c464585d0e9ae273ddee'/>
<id>0de2c4e3a3cb63a2af66c464585d0e9ae273ddee</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>commit: faster parsing</title>
<updated>2014-02-05T13:31:13+00:00</updated>
<author>
<name>Carlos Martín Nieto</name>
<email>cmn@dwim.me</email>
</author>
<published>2014-02-05T12:01:54+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/libgit2.git/commit/?id=a6563619e98437a99ff49eef590f62dbb1584358'/>
<id>a6563619e98437a99ff49eef590f62dbb1584358</id>
<content type='text'>
The current code issues a lot of strncmp() calls in order to check for
the end of the header, simply in order to copy it and start going
through it again. These are a lot of calls for something we can check as
we go along. Knowing the amount of parents beforehand to reduce
allocations in extreme cases does not make up for them.

Instead start parsing immediately and check for the double-newline after
each header field, leaving the raw_header allocation for the end, which
lets us go through the header once and reduces the amount of strncmp()
calls significantly.

In unscientific testing, this has reduced a shortlog-like usage (walking
though the whole history of a branch and extracting data from the
commits) of git.git from ~830ms to ~700ms and makes the time we spend in
strncmp() negligible.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The current code issues a lot of strncmp() calls in order to check for
the end of the header, simply in order to copy it and start going
through it again. These are a lot of calls for something we can check as
we go along. Knowing the amount of parents beforehand to reduce
allocations in extreme cases does not make up for them.

Instead start parsing immediately and check for the double-newline after
each header field, leaving the raw_header allocation for the end, which
lets us go through the header once and reduces the amount of strncmp()
calls significantly.

In unscientific testing, this has reduced a shortlog-like usage (walking
though the whole history of a branch and extracting data from the
commits) of git.git from ~830ms to ~700ms and makes the time we spend in
strncmp() negligible.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix reflog message when creating commits</title>
<updated>2014-02-04T23:32:57+00:00</updated>
<author>
<name>Ben Straub</name>
<email>bs@github.com</email>
</author>
<published>2014-02-04T23:32:57+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/libgit2.git/commit/?id=0adb06065b944e755933e11ed9ac7ce544b55d33'/>
<id>0adb06065b944e755933e11ed9ac7ce544b55d33</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>commit: remvoe legacy 'oid' naming</title>
<updated>2014-01-25T07:15:44+00:00</updated>
<author>
<name>Carlos Martín Nieto</name>
<email>cmn@dwim.me</email>
</author>
<published>2014-01-24T11:01:34+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/libgit2.git/commit/?id=47e28349bc4874114e2cfce0b91c40938b105b25'/>
<id>47e28349bc4874114e2cfce0b91c40938b105b25</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Summarize empty messages</title>
<updated>2014-01-22T19:41:04+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@microsoft.com</email>
</author>
<published>2014-01-22T19:41:04+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/libgit2.git/commit/?id=238e8149724ea462153cc082385f60dccc2a3cf9'/>
<id>238e8149724ea462153cc082385f60dccc2a3cf9</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
