Name |
Last commit
|
Last update |
---|---|---|
.. | ||
benchmarks | ||
clar | ||
headertest | ||
libgit2 | ||
resources | ||
util | ||
CMakeLists.txt | ||
README.md |
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 <derrickstolee@github.com>
Name |
Last commit
|
Last update |
---|---|---|
.. | ||
benchmarks | Loading commit data... | |
clar | Loading commit data... | |
headertest | Loading commit data... | |
libgit2 | Loading commit data... | |
resources | Loading commit data... | |
util | Loading commit data... | |
CMakeLists.txt | Loading commit data... | |
README.md | Loading commit data... |