<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/libgit2.git/tests/odb, branch ethomson/annotated_commit_refs</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>odb: Handle corner cases in `git_odb_expand_ids`</title>
<updated>2016-03-09T10:00:27+00:00</updated>
<author>
<name>Vicent Marti</name>
<email>tanoku@gmail.com</email>
</author>
<published>2016-03-09T10:00:27+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=9a7866500545be7d06f1230c0c5109d669c4113a'/>
<id>9a7866500545be7d06f1230c0c5109d669c4113a</id>
<content type='text'>
The old implementation had two issues:

1. OIDs that were too short as to be ambiguous were not being handled
properly.

2. If the last OID to expand in the array was missing from the ODB, we
would leak a `GIT_ENOTFOUND` error code from the function.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The old implementation had two issues:

1. OIDs that were too short as to be ambiguous were not being handled
properly.

2. If the last OID to expand in the array was missing from the ODB, we
would leak a `GIT_ENOTFOUND` error code from the function.
</pre>
</div>
</content>
</entry>
<entry>
<title>git_odb_expand_ids: accept git_odb_expand_id array</title>
<updated>2016-03-08T19:57:20+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@github.com</email>
</author>
<published>2016-03-08T19:09:55+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=62484f52d1d4dbbfd83a11f54a3a742c75de5032'/>
<id>62484f52d1d4dbbfd83a11f54a3a742c75de5032</id>
<content type='text'>
Take (and write to) an array of a struct, `git_odb_expand_id`.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Take (and write to) an array of a struct, `git_odb_expand_id`.
</pre>
</div>
</content>
</entry>
<entry>
<title>git_odb_expand_ids: rename func, return the type</title>
<updated>2016-03-08T16:44:21+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@github.com</email>
</author>
<published>2016-03-08T16:44:21+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=4b1f0f79ac95daf872232ad8dc968bed06aca01b'/>
<id>4b1f0f79ac95daf872232ad8dc968bed06aca01b</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>git_odb_exists_many_prefixes: query odb for multiple short ids</title>
<updated>2016-03-07T21:10:25+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@github.com</email>
</author>
<published>2016-03-04T05:50:35+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=6c04269c8f558c109b0cd4524feb9d95bbbb3f6b'/>
<id>6c04269c8f558c109b0cd4524feb9d95bbbb3f6b</id>
<content type='text'>
Query the object database for multiple objects at a time, given their
object ID (which may be abbreviated) and optional type.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Query the object database for multiple objects at a time, given their
object ID (which may be abbreviated) and optional type.
</pre>
</div>
</content>
</entry>
<entry>
<title>odb: Prioritize alternate backends</title>
<updated>2015-10-14T18:53:01+00:00</updated>
<author>
<name>Vicent Marti</name>
<email>tanoku@gmail.com</email>
</author>
<published>2015-10-14T17:31:54+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=a0a1b19ab043f3579aabfb7602b4c4ac4dd69e72'/>
<id>a0a1b19ab043f3579aabfb7602b4c4ac4dd69e72</id>
<content type='text'>
For most real use cases, repositories with alternates use them as main
object storage. Checking the alternate for objects before the main
repository should result in measurable speedups.

Because of this, we're changing the sorting algorithm to prioritize
alternates *in cases where two backends have the same priority*. This
means that the pack backend for the alternate will be checked before the
pack backend for the main repository *but* both of them will be checked
before any loose backends.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
For most real use cases, repositories with alternates use them as main
object storage. Checking the alternate for objects before the main
repository should result in measurable speedups.

Because of this, we're changing the sorting algorithm to prioritize
alternates *in cases where two backends have the same priority*. This
means that the pack backend for the alternate will be checked before the
pack backend for the main repository *but* both of them will be checked
before any loose backends.
</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://91.123.203.49/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>
<entry>
<title>git_futils_mkdir_*: make a relative-to-base mkdir</title>
<updated>2015-09-17T14:00:35+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@microsoft.com</email>
</author>
<published>2015-09-16T19:07:27+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=ac2fba0ecd68e8eae348dec688cbcd0828432cdf'/>
<id>ac2fba0ecd68e8eae348dec688cbcd0828432cdf</id>
<content type='text'>
Untangle git_futils_mkdir from git_futils_mkdir_ext - the latter
assumes that we own everything beneath the base, as if it were
being called with a base of the repository or working directory,
and is tailored towards checkout and ensuring that there is no
bogosity beneath the base that must be cleaned up.

This is (at best) slow and (at worst) unsafe in the larger context
of a filesystem where we do not own things and cannot do things like
unlink symlinks that are in our way.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Untangle git_futils_mkdir from git_futils_mkdir_ext - the latter
assumes that we own everything beneath the base, as if it were
being called with a base of the repository or working directory,
and is tailored towards checkout and ensuring that there is no
bogosity beneath the base that must be cleaned up.

This is (at best) slow and (at worst) unsafe in the larger context
of a filesystem where we do not own things and cannot do things like
unlink symlinks that are in our way.
</pre>
</div>
</content>
</entry>
<entry>
<title>path: error out if the callback returns an error</title>
<updated>2015-06-06T01:55:28+00:00</updated>
<author>
<name>Carlos Martín Nieto</name>
<email>cmn@dwim.me</email>
</author>
<published>2015-06-06T01:55:28+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=8da44047050c16b563575cf973c1f33b6149f1cc'/>
<id>8da44047050c16b563575cf973c1f33b6149f1cc</id>
<content type='text'>
When the callback returns an error, we should stop immediately. This
broke when trying to make sure we pass specific errors up the chain.

This broke cancelling out of the loose backend's foreach.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When the callback returns an error, we should stop immediately. This
broke when trying to make sure we pass specific errors up the chain.

This broke cancelling out of the loose backend's foreach.
</pre>
</div>
</content>
</entry>
<entry>
<title>odb: `git_odb_object` contents are never NULL</title>
<updated>2014-11-21T13:09:53+00:00</updated>
<author>
<name>Vicent Marti</name>
<email>tanoku@gmail.com</email>
</author>
<published>2014-11-21T12:50:46+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=e015665142fad7314581063b25202f32631d510e'/>
<id>e015665142fad7314581063b25202f32631d510e</id>
<content type='text'>
This is a contract that we made in the library and that we need to uphold. The
contents of a blob can never be NULL because several parts of the library (including
the filter and attributes code) expect `git_blob_rawcontent` to always return a
valid pointer.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is a contract that we made in the library and that we need to uphold. The
contents of a blob can never be NULL because several parts of the library (including
the filter and attributes code) expect `git_blob_rawcontent` to always return a
valid pointer.
</pre>
</div>
</content>
</entry>
<entry>
<title>odb: hardcode the empty blob and tree</title>
<updated>2014-11-08T19:53:38+00:00</updated>
<author>
<name>Carlos Martín Nieto</name>
<email>cmn@dwim.me</email>
</author>
<published>2014-11-08T13:40:53+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=e1ac0101480c29631ad56409d77f2dd7b65bfd09'/>
<id>e1ac0101480c29631ad56409d77f2dd7b65bfd09</id>
<content type='text'>
git hardocodes these as objects which exist regardless of whether they
are in the odb and uses them in the shell interface as a way of
expressing the lack of a blob or tree for one side of e.g. a diff.

In the library we use each language's natural way of declaring a lack of
value which makes a workaround like this unnecessary. Since git uses it,
it does however mean each shell application would need to perform this
check themselves.

This makes it common work across a range of applications and an issue
with compatibility with git, which fits right into what the library aims
to provide.

Thus we introduce the hard-coded empty blob and tree in the odb
frontend. These hard-coded objects are checked for before going to the
backends, but after the cache check, which means the second time they're
used, they will be treated as normal cached objects instead of creating
new ones.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
git hardocodes these as objects which exist regardless of whether they
are in the odb and uses them in the shell interface as a way of
expressing the lack of a blob or tree for one side of e.g. a diff.

In the library we use each language's natural way of declaring a lack of
value which makes a workaround like this unnecessary. Since git uses it,
it does however mean each shell application would need to perform this
check themselves.

This makes it common work across a range of applications and an issue
with compatibility with git, which fits right into what the library aims
to provide.

Thus we introduce the hard-coded empty blob and tree in the odb
frontend. These hard-coded objects are checked for before going to the
backends, but after the cache check, which means the second time they're
used, they will be treated as normal cached objects instead of creating
new ones.
</pre>
</div>
</content>
</entry>
</feed>
