| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
Teach the packfile machinery to cope with SHA256.
|
|
|
|
|
|
|
|
| |
This should resolve some issues with UBSan builds by using unsigned
64-bit integers for all arithmetic until we finally convert to an offset
or size value.
Signed-off-by: Derrick Stolee <derrickstolee@github.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
| |
The experimental function signature is only available when
`GIT_EXPERIMENTAL_SHA256` is enabled.
|
|
|
|
|
| |
`git_oid`s now have a type, and we require the oid type when creating
the object id from creation functions.
|
|
|
|
|
| |
In preparation for SHA256 support, `GIT_OID_RAWSZ` and `GIT_OID_HEXSZ`
need to indicate that they're the size of _SHA1_ OIDs.
|
|
|
|
|
| |
The commit graph contains arrays of raw oid data, use a byte array to
index into them.
|
|
|
|
|
| |
We will talk about "raw" oids as untyped blobs of data; use a name for
the comparison function that is in keeping with that.
|
|
|