<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/libgit2.git/include/git2/sys/odb_backend.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>midx: Introduce git_odb_write_multi_pack_index()</title>
<updated>2021-08-27T11:12:16+00:00</updated>
<author>
<name>lhchavez</name>
<email>lhchavez@lhchavez.com</email>
</author>
<published>2020-02-18T00:02:13+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=ea285904dcb1350d99703df86a5f38662935cbbc'/>
<id>ea285904dcb1350d99703df86a5f38662935cbbc</id>
<content type='text'>
This change introduces git_odb_write_multi_pack_index(), which creates a
`multi-pack-index` file from all the `.pack` files that have been loaded
in the ODB.

Fixes: #5399
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This change introduces git_odb_write_multi_pack_index(), which creates a
`multi-pack-index` file from all the `.pack` files that have been loaded
in the ODB.

Fixes: #5399
</pre>
</div>
</content>
</entry>
<entry>
<title>odb: use `git_object_size_t` for object size</title>
<updated>2019-11-22T04:14:13+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@edwardthomson.com</email>
</author>
<published>2019-06-23T15:42:14+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=fefefd1d39420095631987e503402f8ee6956163'/>
<id>fefefd1d39420095631987e503402f8ee6956163</id>
<content type='text'>
Instead of using a signed type (`off_t`) use a new `git_object_size_t`
for the sizes of objects.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Instead of using a signed type (`off_t`) use a new `git_object_size_t`
for the sizes of objects.
</pre>
</div>
</content>
</entry>
<entry>
<title>odb: provide a free function for custom backends</title>
<updated>2019-02-23T18:42:53+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@edwardthomson.com</email>
</author>
<published>2019-02-23T18:42:53+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=459ac856d94d4a59ee47b2807aa8e4b029499582'/>
<id>459ac856d94d4a59ee47b2807aa8e4b029499582</id>
<content type='text'>
Custom backends can allocate memory when reading objects and providing
them to libgit2.  However, if an error occurs in the custom backend
after the memory has been allocated for the custom object but before
it's returned to libgit2, the custom backend has no way to free that
memory and it must be leaked.

Provide a free function that corresponds to the alloc function so that
custom backends have an opportunity to free memory before they return an
error.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Custom backends can allocate memory when reading objects and providing
them to libgit2.  However, if an error occurs in the custom backend
after the memory has been allocated for the custom object but before
it's returned to libgit2, the custom backend has no way to free that
memory and it must be leaked.

Provide a free function that corresponds to the alloc function so that
custom backends have an opportunity to free memory before they return an
error.
</pre>
</div>
</content>
</entry>
<entry>
<title>odb: rename git_odb_backend_malloc for consistency</title>
<updated>2019-02-23T18:40:43+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@edwardthomson.com</email>
</author>
<published>2019-02-23T18:40:43+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=790aae778df9bf4809e3c1e772d4d948c1cc2aa3'/>
<id>790aae778df9bf4809e3c1e772d4d948c1cc2aa3</id>
<content type='text'>
The `git_odb_backend_malloc` name is a system function that is provided
for custom ODB backends and allows them to allocate memory for an ODB
object in the read callback.  This is important so that libgit2 can
later free the memory used by an ODB object that was read from the
custom backend.

However, the name _suggests_ that it actually allocates a
`git_odb_backend`.  It does not; rename it to make it clear that it
actually allocates backend _data_.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The `git_odb_backend_malloc` name is a system function that is provided
for custom ODB backends and allows them to allocate memory for an ODB
object in the read callback.  This is important so that libgit2 can
later free the memory used by an ODB object that was read from the
custom backend.

However, the name _suggests_ that it actually allocates a
`git_odb_backend`.  It does not; rename it to make it clear that it
actually allocates backend _data_.
</pre>
</div>
</content>
</entry>
<entry>
<title>indexer: use git_indexer_progress throughout</title>
<updated>2019-02-22T11:25:14+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@edwardthomson.com</email>
</author>
<published>2019-02-21T10:33:30+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=a1ef995dc03379fb1f5151b5d98d16644218c95e'/>
<id>a1ef995dc03379fb1f5151b5d98d16644218c95e</id>
<content type='text'>
Update internal usage of `git_transfer_progress` to
`git_indexer_progreses`.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Update internal usage of `git_transfer_progress` to
`git_indexer_progreses`.
</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>odb: provide length and type with streaming read</title>
<updated>2018-02-02T00:35:49+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@edwardthomson.com</email>
</author>
<published>2017-12-17T01:12:49+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=97f9a5f0bca920e2ce260b17fa7cea0a2c0991ca'/>
<id>97f9a5f0bca920e2ce260b17fa7cea0a2c0991ca</id>
<content type='text'>
The streaming read functionality should provide the length and the type
of the object, like the normal read functionality does.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The streaming read functionality should provide the length and the type
of the object, like the normal read functionality does.
</pre>
</div>
</content>
</entry>
<entry>
<title>odb: freshen existing objects when writing</title>
<updated>2016-08-04T19:12:04+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@github.com</email>
</author>
<published>2016-07-14T20:23:24+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=8f09a98e1809dcdfd9d25b8268657bac4d942e6a'/>
<id>8f09a98e1809dcdfd9d25b8268657bac4d942e6a</id>
<content type='text'>
When writing an object, we calculate its OID and see if it exists in the
object database.  If it does, we need to freshen the file that contains
it.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When writing an object, we calculate its OID and see if it exists in the
object database.  If it does, we need to freshen the file that contains
it.
</pre>
</div>
</content>
</entry>
<entry>
<title>refdb and odb backends must provide `free` function</title>
<updated>2015-09-30T22:50:37+00:00</updated>
<author>
<name>Arthur Schreiber</name>
<email>schreiber.arthur@googlemail.com</email>
</author>
<published>2015-09-30T22:50:37+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=d3b29fb94bf1c1d0caec39b4a2c3d2061c63efec'/>
<id>d3b29fb94bf1c1d0caec39b4a2c3d2061c63efec</id>
<content type='text'>
As refdb and odb backends can be allocated by client code, libgit2
can’t know whether an alternative memory allocator was used, and thus
should not try to call `git__free` on those objects.

Instead, odb and refdb backend implementations must always provide
their own `free` functions to ensure memory gets freed correctly.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
As refdb and odb backends can be allocated by client code, libgit2
can’t know whether an alternative memory allocator was used, and thus
should not try to call `git__free` on those objects.

Instead, odb and refdb backend implementations must always provide
their own `free` functions to ensure memory gets freed correctly.
</pre>
</div>
</content>
</entry>
</feed>
