<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/libgit2.git/src/libgit2/commit_graph.h, branch ethomson/objectformat</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>commit-graph: only verify csum on git_commit_graph_open().</title>
<updated>2022-11-03T16:09:18+00:00</updated>
<author>
<name>Colin Stolley</name>
<email>ccstolley@github.com</email>
</author>
<published>2022-06-16T21:50:35+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=2c4eb83ee14bca44c2442727bacd82312cbedfc5'/>
<id>2c4eb83ee14bca44c2442727bacd82312cbedfc5</id>
<content type='text'>
It is expensive to compute the sha1 of the entire commit-graph file each
time we open it. Git only does this if it is re-writing the file.

This patch will only verify the checksum when calling the external API
git_commit_graph_open(), which explicitly says it opens and verifies
the commit graph in the documentation.

For internal library calls, we call git_commit_graph_get_file(), which
mmaps the commit-graph file in read-only mode. Therefore it is safe to
skip the validation check there.

Tests were added to check that the validation works in the happy path,
and prevents us from opening the file when validation fails.

(Note from Derrick Stolee: This patch was applied internally at GitHub
after we recognized the performance impact it had during an upgrade of
libgit2. The original author left the company before we remembered to
send it upstream.)

Signed-off-by: Derrick Stolee &lt;derrickstolee@github.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It is expensive to compute the sha1 of the entire commit-graph file each
time we open it. Git only does this if it is re-writing the file.

This patch will only verify the checksum when calling the external API
git_commit_graph_open(), which explicitly says it opens and verifies
the commit graph in the documentation.

For internal library calls, we call git_commit_graph_get_file(), which
mmaps the commit-graph file in read-only mode. Therefore it is safe to
skip the validation check there.

Tests were added to check that the validation works in the happy path,
and prevents us from opening the file when validation fails.

(Note from Derrick Stolee: This patch was applied internally at GitHub
after we recognized the performance impact it had during an upgrade of
libgit2. The original author left the company before we remembered to
send it upstream.)

Signed-off-by: Derrick Stolee &lt;derrickstolee@github.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>commit_graph: use raw oid data</title>
<updated>2022-04-10T19:56:57+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@edwardthomson.com</email>
</author>
<published>2022-01-22T00:38:13+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=c2b3b0d87da30efd0df495ea2c99cce2f0b7d6c5'/>
<id>c2b3b0d87da30efd0df495ea2c99cce2f0b7d6c5</id>
<content type='text'>
The commit graph contains arrays of raw oid data, use a byte array to
index into them.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The commit graph contains arrays of raw oid data, use a byte array to
index into them.
</pre>
</div>
</content>
</entry>
<entry>
<title>refactor: `src` is now `src/libgit2`</title>
<updated>2022-02-23T03:07:44+00:00</updated>
<author>
<name>Edward Thomson</name>
<email>ethomson@edwardthomson.com</email>
</author>
<published>2021-11-14T13:47:40+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/libgit2.git/commit/?id=ef4ab2988320005cbcb3db920e6b41f10b3c60cf'/>
<id>ef4ab2988320005cbcb3db920e6b41f10b3c60cf</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
