<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/libgit2.git/src/pool.c, branch cmn/pack-cache-init</title>
<subtitle>github.com: libgit2/libgit2.git
</subtitle>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/'/>
<entry>
<title>pool: Correct overflow checks</title>
<updated>2013-12-13T11:41:22+00:00</updated>
<author>
<name>Vicent Marti</name>
<email>tanoku@gmail.com</email>
</author>
<published>2013-12-13T11:41:22+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=437f7d69b22324d20fe833aa53119885733029c2'/>
<id>437f7d69b22324d20fe833aa53119885733029c2</id>
<content type='text'>
Ok, scrap the previous commit. This is the right overflow check that
takes care of 64 bit overflow **and** 32-bit overflow, which needs to be
considered because the pool malloc can only allocate 32-bit elements in
one go.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Ok, scrap the previous commit. This is the right overflow check that
takes care of 64 bit overflow **and** 32-bit overflow, which needs to be
considered because the pool malloc can only allocate 32-bit elements in
one go.
</pre>
</div>
</content>
</entry>
<entry>
<title>pool: Cleanup error handling in pool_strdup</title>
<updated>2013-12-13T11:25:48+00:00</updated>
<author>
<name>Vicent Marti</name>
<email>tanoku@gmail.com</email>
</author>
<published>2013-12-13T11:25:48+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=ce33645ff32d68dfd89867468f58fd9c245c26ff'/>
<id>ce33645ff32d68dfd89867468f58fd9c245c26ff</id>
<content type='text'>
Note that `git_pool_strdup` cannot really return any error codes,
 because the pool doesn't set errors on OOM.

 The only place where `giterr_set_oom` is called is in
 `git_pool_strndup`, in a conditional check that is always optimized
 away. `n + 1` cannot be zero if `n` is unsigned because the compiler
 doesn't take wraparound into account.

 This check has been removed altogether because `size_t` is not
 particularly going to overflow.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Note that `git_pool_strdup` cannot really return any error codes,
 because the pool doesn't set errors on OOM.

 The only place where `giterr_set_oom` is called is in
 `git_pool_strndup`, in a conditional check that is always optimized
 away. `n + 1` cannot be zero if `n` is unsigned because the compiler
 doesn't take wraparound into account.

 This check has been removed altogether because `size_t` is not
 particularly going to overflow.
</pre>
</div>
</content>
</entry>
<entry>
<title>Improve GIT_EUSER handling</title>
<updated>2013-12-11T18:57:49+00:00</updated>
<author>
<name>Russell Belfer</name>
<email>rb@github.com</email>
</author>
<published>2013-12-04T00:45:39+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=96869a4edb2872934e0e167a726ab240f4270fea'/>
<id>96869a4edb2872934e0e167a726ab240f4270fea</id>
<content type='text'>
This adds giterr_user_cancel to return GIT_EUSER and clear any
error message that is sitting around.  As a result of using that
in places, we need to be more thorough with capturing errors that
happen inside a callback when used internally.  To help with that,
this also adds giterr_capture and giterr_restore so that when we
internally use a foreach-type function that clears errors and
converts them to GIT_EUSER, it is easier to restore not just the
return value, but the actual error message text.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This adds giterr_user_cancel to return GIT_EUSER and clear any
error message that is sitting around.  As a result of using that
in places, we need to be more thorough with capturing errors that
happen inside a callback when used internally.  To help with that,
this also adds giterr_capture and giterr_restore so that when we
internally use a foreach-type function that clears errors and
converts them to GIT_EUSER, it is easier to restore not just the
return value, but the actual error message text.
</pre>
</div>
</content>
</entry>
<entry>
<title>allow (ignore) bare slash in gitignore</title>
<updated>2013-05-29T21:26:25+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@microsoft.com</email>
</author>
<published>2013-05-29T21:03:30+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=2d160ef782c812bd7d68413a00a62f46585725d0'/>
<id>2d160ef782c812bd7d68413a00a62f46585725d0</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>pool: Internal struct name</title>
<updated>2013-03-15T11:11:02+00:00</updated>
<author>
<name>Vicent Marti</name>
<email>tanoku@gmail.com</email>
</author>
<published>2013-03-15T11:11:02+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=f16fb09951cbd9f920e141a46fe5409d6ffebcb9'/>
<id>f16fb09951cbd9f920e141a46fe5409d6ffebcb9</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Added pool freelist struct for readability</title>
<updated>2013-03-14T22:08:04+00:00</updated>
<author>
<name>Russell Belfer</name>
<email>rb@github.com</email>
</author>
<published>2013-03-14T22:08:04+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=14bedad90776b750cf69ed6faadf2d6c3a4e0a86'/>
<id>14bedad90776b750cf69ed6faadf2d6c3a4e0a86</id>
<content type='text'>
This adds a git_pool_freelist_item struct that makes it a little
easier to follow what's going on with the pool free list block
management code.  It is functionally neutral.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This adds a git_pool_freelist_item struct that makes it a little
easier to follow what's going on with the pool free list block
management code.  It is functionally neutral.
</pre>
</div>
</content>
</entry>
<entry>
<title>Improved tree iterator internals</title>
<updated>2013-03-14T20:40:15+00:00</updated>
<author>
<name>Russell Belfer</name>
<email>rb@github.com</email>
</author>
<published>2013-03-14T20:40:15+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=0c46863384e9da3746b90ddf81eef6d25d475e5c'/>
<id>0c46863384e9da3746b90ddf81eef6d25d475e5c</id>
<content type='text'>
This updates the tree iterator internals to be more efficient.

The tree_iterator_entry objects are now kept as pointers that are
allocated from a git_pool, so that we may use git__tsort_r for
sorting (which is better than qsort, given that the tree is
likely mostly ordered already).

Those tree_iterator_entry objects now keep direct pointers to the
data they refer to instead of keeping indirect index values.  This
simplifies a lot of the data structure traversal code.

This also adds bsearch to find the start item position for range-
limited tree iterators, and is more explicit about using
git_path_cmp instead of reimplementing it.  The git_path_cmp
changed a bit to make it easier for tree_iterators to use it (but
it was barely being used previously, so not a big deal).

This adds a git_pool_free_array function that efficiently frees a
list of pool allocated pointers (which the tree_iterator keeps).
Also, added new tests for the git_pool free list functionality
that was not previously being tested (or used).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This updates the tree iterator internals to be more efficient.

The tree_iterator_entry objects are now kept as pointers that are
allocated from a git_pool, so that we may use git__tsort_r for
sorting (which is better than qsort, given that the tree is
likely mostly ordered already).

Those tree_iterator_entry objects now keep direct pointers to the
data they refer to instead of keeping indirect index values.  This
simplifies a lot of the data structure traversal code.

This also adds bsearch to find the start item position for range-
limited tree iterators, and is more explicit about using
git_path_cmp instead of reimplementing it.  The git_path_cmp
changed a bit to make it easier for tree_iterators to use it (but
it was barely being used previously, so not a big deal).

This adds a git_pool_free_array function that efficiently frees a
list of pool allocated pointers (which the tree_iterator keeps).
Also, added new tests for the git_pool free list functionality
that was not previously being tested (or used).
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix bug with merging diffs with null options</title>
<updated>2012-07-19T17:23:45+00:00</updated>
<author>
<name>Russell Belfer</name>
<email>rb@github.com</email>
</author>
<published>2012-07-19T17:23:45+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=71d273583755c0a2b7f5d608f017f4586add51e4'/>
<id>71d273583755c0a2b7f5d608f017f4586add51e4</id>
<content type='text'>
A diff that is created with a NULL options parameter could result
in a NULL prefix string, but diff merge was unconditionally
strdup'ing it.  I added a test to replicate the issue and then a
new method that does the right thing with NULL values.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
A diff that is created with a NULL options parameter could result
in a NULL prefix string, but diff merge was unconditionally
strdup'ing it.  I added a test to replicate the issue and then a
new method that does the right thing with NULL values.
</pre>
</div>
</content>
</entry>
<entry>
<title>Updates from comments on OS4 compatibility pull request http://github.com/libgit2/libgit2/pull/766</title>
<updated>2012-06-14T17:57:24+00:00</updated>
<author>
<name>Chris Young</name>
<email>chris@unsatisfactorysoftware.co.uk</email>
</author>
<published>2012-06-14T17:57:24+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=a8df98c6fb07b8ddff18a01d7f2f607d9493dd7c'/>
<id>a8df98c6fb07b8ddff18a01d7f2f607d9493dd7c</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>random page size for os4</title>
<updated>2012-06-07T20:40:07+00:00</updated>
<author>
<name>Chris Young</name>
<email>chris@unsatisfactorysoftware.co.uk</email>
</author>
<published>2012-06-07T20:40:07+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=6b5db63c159ea1d2112fe8dc535b877da03a6848'/>
<id>6b5db63c159ea1d2112fe8dc535b877da03a6848</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
