summaryrefslogtreecommitdiff
path: root/tests/libgit2/graph/commitgraph.c
Commit message (Collapse)AuthorAgeFilesLines
* commit graph: support sha256Edward Thomson2023-04-101-2/+15
|
* commit-graph: only verify csum on git_commit_graph_open().Colin Stolley2022-11-031-0/+41
| | | | | | | | | | | | | | | | | | | | | | | 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-10/+10
| | | | | The experimental function signature is only available when `GIT_EXPERIMENTAL_SHA256` is enabled.
* oid: give oids a typeEdward Thomson2022-06-201-10/+10
| | | | | `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-3/+3
| | | | | In preparation for SHA256 support, `GIT_OID_RAWSZ` and `GIT_OID_HEXSZ` need to indicate that they're the size of _SHA1_ OIDs.
* refactor: `tests` is now `tests/libgit2`Edward Thomson2022-02-221-0/+126
Like we want to separate libgit2 and utility source code, we want to separate libgit2 and utility tests. Start by moving all the tests into libgit2.