<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/libgit2.git/include/git2/errors.h, branch ethomson/winhttp</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: verify object hashes</title>
<updated>2017-04-28T12:05:45+00:00</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2017-04-10T07:30:08+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=28a0741f1ae6f5e1261c8e73854dda69e7a61067'/>
<id>28a0741f1ae6f5e1261c8e73854dda69e7a61067</id>
<content type='text'>
The upstream git.git project verifies objects when looking them up from
disk. This avoids scenarios where objects have somehow become corrupt on
disk, e.g. due to hardware failures or bit flips. While our mantra is
usually to follow upstream behavior, we do not do so in this case, as we
never check hashes of objects we have just read from disk.

To fix this, we create a new error class `GIT_EMISMATCH` which denotes
that we have looked up an object with a hashsum mismatch. `odb_read_1`
will then, after having read the object from its backend, hash the
object and compare the resulting hash to the expected hash. If hashes do
not match, it will return an error.

This obviously introduces another computation of checksums and could
potentially impact performance. Note though that we usually perform I/O
operations directly before doing this computation, and as such the
actual overhead should be drowned out by I/O. Running our test suite
seems to confirm this guess. On a Linux system with best-of-five
timings, we had 21.592s with the check enabled and 21.590s with the
ckeck disabled. Note though that our test suite mostly contains very
small blobs only. It is expected that repositories with bigger blobs may
notice an increased hit by this check.

In addition to a new test, we also had to change the
odb::backend::nonrefreshing test suite, which now triggers a hashsum
mismatch when looking up the commit "deadbeef...". This is expected, as
the fake backend allocated inside of the test will return an empty
object for the OID "deadbeef...", which will obviously not hash back to
"deadbeef..." again. We can simply adjust the hash to equal the hash of
the empty object here to fix this test.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The upstream git.git project verifies objects when looking them up from
disk. This avoids scenarios where objects have somehow become corrupt on
disk, e.g. due to hardware failures or bit flips. While our mantra is
usually to follow upstream behavior, we do not do so in this case, as we
never check hashes of objects we have just read from disk.

To fix this, we create a new error class `GIT_EMISMATCH` which denotes
that we have looked up an object with a hashsum mismatch. `odb_read_1`
will then, after having read the object from its backend, hash the
object and compare the resulting hash to the expected hash. If hashes do
not match, it will return an error.

This obviously introduces another computation of checksums and could
potentially impact performance. Note though that we usually perform I/O
operations directly before doing this computation, and as such the
actual overhead should be drowned out by I/O. Running our test suite
seems to confirm this guess. On a Linux system with best-of-five
timings, we had 21.592s with the check enabled and 21.590s with the
ckeck disabled. Note though that our test suite mostly contains very
small blobs only. It is expected that repositories with bigger blobs may
notice an increased hit by this check.

In addition to a new test, we also had to change the
odb::backend::nonrefreshing test suite, which now triggers a hashsum
mismatch when looking up the commit "deadbeef...". This is expected, as
the fake backend allocated inside of the test will return an empty
object for the OID "deadbeef...", which will obviously not hash back to
"deadbeef..." again. We can simply adjust the hash to equal the hash of
the empty object here to fix this test.
</pre>
</div>
</content>
</entry>
<entry>
<title>win32: introduce `do_with_retries` macro</title>
<updated>2017-04-01T09:47:30+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@edwardthomson.com</email>
</author>
<published>2017-04-01T09:44:17+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=cc8d9a29e7cb24a43a10ec86a789efcf12394974'/>
<id>cc8d9a29e7cb24a43a10ec86a789efcf12394974</id>
<content type='text'>
Provide a macro that will allow us to run a function with posix-like
return values multiple times in a retry loop, with an optional cleanup
function called between invocations.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Provide a macro that will allow us to run a function with posix-like
return values multiple times in a retry loop, with an optional cleanup
function called between invocations.
</pre>
</div>
</content>
</entry>
<entry>
<title>hash: include sha1collisiondetection</title>
<updated>2017-03-03T10:50:27+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@github.com</email>
</author>
<published>2017-02-24T13:34:01+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=2dfd1294f7a694bfa9e864a9489ae3cb318a5ed0'/>
<id>2dfd1294f7a694bfa9e864a9489ae3cb318a5ed0</id>
<content type='text'>
Include the SHA1 collision attack detection library from
https://github.com/cr-marcstevens/sha1collisiondetection
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Include the SHA1 collision attack detection library from
https://github.com/cr-marcstevens/sha1collisiondetection
</pre>
</div>
</content>
</entry>
<entry>
<title>worktree: implement `git_worktree_validate`</title>
<updated>2017-02-13T09:59:16+00:00</updated>
<author>
<name>Patrick Steinhardt</name>
<email>ps@pks.im</email>
</author>
<published>2015-10-21T11:49:55+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=372dc9ff6ada409204b7c3de882e5dad16f30b36'/>
<id>372dc9ff6ada409204b7c3de882e5dad16f30b36</id>
<content type='text'>
Add a new function that checks wether a given `struct
git_worktree` is valid. The validation includes checking if the
gitdir, parent directory and common directory are present.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add a new function that checks wether a given `struct
git_worktree` is valid. The validation includes checking if the
gitdir, parent directory and common directory are present.
</pre>
</div>
</content>
</entry>
<entry>
<title>Introduce git_apply_patch</title>
<updated>2016-05-26T16:36:11+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@microsoft.com</email>
</author>
<published>2014-04-02T06:58:59+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=7cb904ba4443c22ff5396769b7d07a7f329c0102'/>
<id>7cb904ba4443c22ff5396769b7d07a7f329c0102</id>
<content type='text'>
The beginnings of patch application from an existing (diff-created)
git_patch object: applies the hunks of a git_patch to a buffer.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The beginnings of patch application from an existing (diff-created)
git_patch object: applies the hunks of a git_patch to a buffer.
</pre>
</div>
</content>
</entry>
<entry>
<title>giterr_set_str: remove `GITERR_OS` documentation</title>
<updated>2016-02-23T18:08:58+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@github.com</email>
</author>
<published>2016-02-23T18:05:49+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=cd59e0c0c757a5bcc4ed2324b207846b411368cb'/>
<id>cd59e0c0c757a5bcc4ed2324b207846b411368cb</id>
<content type='text'>
The `giterr_set_str` does not actually honor `GITERR_OS`.  Remove
the documentation that claims that we do.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The `giterr_set_str` does not actually honor `GITERR_OS`.  Remove
the documentation that claims that we do.
</pre>
</div>
</content>
</entry>
<entry>
<title>merge: add GIT_MERGE_TREE_FAIL_ON_CONFLICT</title>
<updated>2015-10-22T18:55:17+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@edwardthomson.com</email>
</author>
<published>2015-10-22T18:39:20+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=8683d31f080eb12fe769ab2363165ec17562c840'/>
<id>8683d31f080eb12fe769ab2363165ec17562c840</id>
<content type='text'>
Provide a new merge option, GIT_MERGE_TREE_FAIL_ON_CONFLICT, which
will stop on the first conflict and fail the merge operation with
GIT_EMERGECONFLICT.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Provide a new merge option, GIT_MERGE_TREE_FAIL_ON_CONFLICT, which
will stop on the first conflict and fail the merge operation with
GIT_EMERGECONFLICT.
</pre>
</div>
</content>
</entry>
<entry>
<title>Make giterr_detach no longer public</title>
<updated>2015-08-03T14:23:17+00:00</updated>
<author>
<name>Michael Procter</name>
<email>michael@procter.org.uk</email>
</author>
<published>2015-07-27T08:59:07+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=25dbcf34993cad3cdc3981f1ed394d3374fb640f'/>
<id>25dbcf34993cad3cdc3981f1ed394d3374fb640f</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>errors: add EDIRECTORY</title>
<updated>2015-07-12T10:11:22+00:00</updated>
<author>
<name>Carlos Martín Nieto</name>
<email>cmn@dwim.me</email>
</author>
<published>2015-07-11T16:51:36+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=8a52ed7a482935c74dbb24358e21811dfa6d91c2'/>
<id>8a52ed7a482935c74dbb24358e21811dfa6d91c2</id>
<content type='text'>
This is to be returned when the operation which the user asked for is
not possible to do on a directory.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is to be returned when the operation which the user asked for is
not possible to do on a directory.
</pre>
</div>
</content>
</entry>
<entry>
<title>stash: don't allow apply with staged changes</title>
<updated>2015-06-25T22:34:36+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@edwardthomson.com</email>
</author>
<published>2015-06-20T20:44:22+00:00</published>
<link rel='alternate' type='text/html' href='http://91.123.203.49/cgit/delta/libgit2.git/commit/?id=82b1c93d088319c4e385c11ce738b68103eab96c'/>
<id>82b1c93d088319c4e385c11ce738b68103eab96c</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
