summaryrefslogtreecommitdiff
path: root/src/libgit2/commit_graph.c
Commit message (Collapse)AuthorAgeFilesLines
* commit graph: support sha256Edward Thomson2023-04-101-43/+110
|
* packfile: handle sha256 packfilesEdward Thomson2023-02-121-2/+3
| | | | Teach the packfile machinery to cope with SHA256.
* commit_graph: use uint64_t for arithmeticDerrick Stolee2022-11-101-3/+3
| | | | | | | | 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>
* commit-graph: only verify csum on git_commit_graph_open().Colin Stolley2022-11-031-7/+21
| | | | | | | | | | | | | | | | | | | | | | | 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>
* sha256: indirection for experimental functionsEdward Thomson2022-07-131-2/+2
| | | | | The experimental function signature is only available when `GIT_EXPERIMENTAL_SHA256` is enabled.
* oid: give oids a typeEdward Thomson2022-06-201-3/+3
| | | | | `git_oid`s now have a type, and we require the oid type when creating the object id from creation functions.
* oid: `GIT_OID_*SZ` is now `GIT_OID_SHA1_*SIZE`Edward Thomson2022-06-141-19/+19
| | | | | In preparation for SHA256 support, `GIT_OID_RAWSZ` and `GIT_OID_HEXSZ` need to indicate that they're the size of _SHA1_ OIDs.
* commit_graph: use raw oid dataEdward Thomson2022-04-101-16/+19
| | | | | The commit graph contains arrays of raw oid data, use a byte array to index into them.
* oid: `hashcmp` is now `raw_cmp`Edward Thomson2022-04-101-2/+2
| | | | | We will talk about "raw" oids as untyped blobs of data; use a name for the comparison function that is in keeping with that.
* refactor: `src` is now `src/libgit2`Edward Thomson2022-02-221-0/+1224