<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/libgit2.git/include/git2/tree.h, branch ethomson/util</title>
<subtitle>github.com: libgit2/libgit2.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/'/>
<entry>
<title>Add some missing documentation about return value</title>
<updated>2021-06-02T12:49:33+00:00</updated>
<author>
<name>punkymaniac</name>
<email>punkymaniac@protonmail.ch</email>
</author>
<published>2021-06-02T12:49:33+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=a2fa9a57728dddd1f69d9821d09f20c8305a1d92'/>
<id>a2fa9a57728dddd1f69d9821d09f20c8305a1d92</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>tree: deprecate `git_treebuilder_write_with_buffer`</title>
<updated>2021-03-04T09:30:21+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@edwardthomson.com</email>
</author>
<published>2021-02-28T00:20:28+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=7eb21516ad9a1bd8e7e7b16198e0a4eda299e87d'/>
<id>7eb21516ad9a1bd8e7e7b16198e0a4eda299e87d</id>
<content type='text'>
The function `git_treebuilder_write_with_buffer` is unnecessary; it
is used internally as part of treebuilder writing, but it has little
use to external callers.  For callers that repeatedly write a
treebuilder, we can supply them with a buffer in the treebuilder struct
instead of recreating it.  For ourselves, when we want a single buffer
in our write loop, we can use an internal function.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The function `git_treebuilder_write_with_buffer` is unnecessary; it
is used internally as part of treebuilder writing, but it has little
use to external callers.  For callers that repeatedly write a
treebuilder, we can supply them with a buffer in the treebuilder struct
instead of recreating it.  For ourselves, when we want a single buffer
in our write loop, we can use an internal function.
</pre>
</div>
</content>
</entry>
<entry>
<title>tree functions: return an int</title>
<updated>2020-01-24T21:12:56+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@edwardthomson.com</email>
</author>
<published>2020-01-18T17:38:36+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=3351506aa8ef2b14d28fca5fb4edd55b2f15ad1b'/>
<id>3351506aa8ef2b14d28fca5fb4edd55b2f15ad1b</id>
<content type='text'>
Stop returning a void for functions, future-proofing them to allow them
to fail.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Stop returning a void for functions, future-proofing them to allow them
to fail.
</pre>
</div>
</content>
</entry>
<entry>
<title>tree: return `size_t` for treebuilder entrycount</title>
<updated>2019-06-24T14:00:41+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@edwardthomson.com</email>
</author>
<published>2019-05-21T11:57:28+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=2375be48309e25178fad67ed4f811b948f748478'/>
<id>2375be48309e25178fad67ed4f811b948f748478</id>
<content type='text'>
We keep the treebuilder entrycount as a `size_t` - return that instead
of downcasting to an `unsigned int`.  Callers who were storing this
value in an `unsigned int` will continue to downcast themselves, so
there should be no behavior change for callers.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
We keep the treebuilder entrycount as a `size_t` - return that instead
of downcasting to an `unsigned int`.  Callers who were storing this
value in an `unsigned int` will continue to downcast themselves, so
there should be no behavior change for callers.
</pre>
</div>
</content>
</entry>
<entry>
<title>Introduce GIT_CALLBACK macro to enforce cdecl</title>
<updated>2019-01-17T21:17:32+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@edwardthomson.com</email>
</author>
<published>2019-01-09T18:25:10+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=22d2062d954dcb88fa3dc65281d3f3d88ae87d68'/>
<id>22d2062d954dcb88fa3dc65281d3f3d88ae87d68</id>
<content type='text'>
Since we now always build the library with cdecl calling conventions,
our callbacks should be decorated as such so that users will not be able
to provide callbacks defined with other calling conventions.

The `GIT_CALLBACK` macro will inject the `__cdecl` attribute as
appropriate.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Since we now always build the library with cdecl calling conventions,
our callbacks should be decorated as such so that users will not be able
to provide callbacks defined with other calling conventions.

The `GIT_CALLBACK` macro will inject the `__cdecl` attribute as
appropriate.
</pre>
</div>
</content>
</entry>
<entry>
<title>object_type: update public API to use git_object_t</title>
<updated>2018-12-01T10:44:16+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@edwardthomson.com</email>
</author>
<published>2018-11-14T23:35:48+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=19faf7c5fcd24fab789d9b7a619b343c1fae7c86'/>
<id>19faf7c5fcd24fab789d9b7a619b343c1fae7c86</id>
<content type='text'>
git_object_t is the future; update the public API to use it.  This will
also ensure that we can build our tests which make use of the old API
without modification (and without compiler warnings).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
git_object_t is the future; update the public API to use it.  This will
also ensure that we can build our tests which make use of the old API
without modification (and without compiler warnings).
</pre>
</div>
</content>
</entry>
<entry>
<title>docs: git_treebuilder_insert validates entries</title>
<updated>2017-12-31T15:25:42+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@edwardthomson.com</email>
</author>
<published>2017-12-31T15:25:42+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=346c1b169d0c15adeef496e24db6ac9801b4283d'/>
<id>346c1b169d0c15adeef496e24db6ac9801b4283d</id>
<content type='text'>
The documentation for `git_treebuilder_insert` erroneously states that
we do not validate that the entry being inserted exists.  We do, as of
https://github.com/libgit2/libgit2/pull/3633.  Update the documentation
to reflect the new reality.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The documentation for `git_treebuilder_insert` erroneously states that
we do not validate that the entry being inserted exists.  We do, as of
https://github.com/libgit2/libgit2/pull/3633.  Update the documentation
to reflect the new reality.
</pre>
</div>
</content>
</entry>
<entry>
<title>parameter 'id' not found in the function declaration</title>
<updated>2017-01-23T12:32:34+00:00</updated>
<author>
<name>Etienne Samson</name>
<email>samson.etienne@gmail.com</email>
</author>
<published>2017-01-23T12:28:02+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=7414acf5f97c0be1fec0504a61624be3eb814f2f'/>
<id>7414acf5f97c0be1fec0504a61624be3eb814f2f</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>write_tree: use shared buffer for writing trees</title>
<updated>2016-12-12T15:46:05+00:00</updated>
<author>
<name>Michael Tesch</name>
<email>mitesch@microsoft.com</email>
</author>
<published>2016-08-09T16:23:19+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=87aaefe20b2e2fad8f0b8b236d1c23ce9ec5340f'/>
<id>87aaefe20b2e2fad8f0b8b236d1c23ce9ec5340f</id>
<content type='text'>
The function to write trees allocates a new buffer for each tree.
This causes problems with performance when performing a lot
of actions involving writing trees, e.g. when doing many merges.
Fix the issue by instead handing in a shared buffer, which is then
re-used across the calls without having to re-allocate between
calls.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The function to write trees allocates a new buffer for each tree.
This causes problems with performance when performing a lot
of actions involving writing trees, e.g. when doing many merges.
Fix the issue by instead handing in a shared buffer, which is then
re-used across the calls without having to re-allocate between
calls.
</pre>
</div>
</content>
</entry>
<entry>
<title>Introduce a function to create a tree based on a different one</title>
<updated>2016-05-17T15:41:05+00:00</updated>
<author>
<name>Carlos Martín Nieto</name>
<email>cmn@dwim.me</email>
</author>
<published>2016-05-02T15:36:58+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=9464f9ebc1794314421353e10eeddfa8a950f7ab'/>
<id>9464f9ebc1794314421353e10eeddfa8a950f7ab</id>
<content type='text'>
Instead of going through the usual steps of reading a tree recursively
into an index, modifying it and writing it back out as a tree, introduce
a function to perform simple updates more efficiently.

`git_tree_create_updated` avoids reading trees which are not modified
and supports upsert and delete operations. It is not as versatile as
modifying the index, but it makes some common operations much more
efficient.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Instead of going through the usual steps of reading a tree recursively
into an index, modifying it and writing it back out as a tree, introduce
a function to perform simple updates more efficiently.

`git_tree_create_updated` avoids reading trees which are not modified
and supports upsert and delete operations. It is not as versatile as
modifying the index, but it makes some common operations much more
efficient.
</pre>
</div>
</content>
</entry>
</feed>
