8000 SHA256: early preparation by ethomson · Pull Request #6192 · libgit2/libgit2 · GitHub
[go: up one dir, main page]

Skip to content

SHA256: early preparation #6192

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Feb 6, 2022
Merged

SHA256: early preparation #6192

merged 9 commits into from
Feb 6, 2022

Conversation

ethomson
Copy link
Member

This splits out some of the early grounding work in #6191 so that we can include it in the next minor release.

Notably, this makes our checksums simple byte arrays instead of them being git_oids. (Our file checksums are not object IDs, after all). It's important to get this in to the next release to mark functions like git_index_checksum as deprecated for their eventual removal.

Underscores in filenames in tests indicate a logical separation - so
`commit_graph` becomes `commit::graph`.  Rename it to `commitgraph` to
avoid this.
The `git_oid_tostr_s` helper is indeed helpful, unless you are using
printf debugging (by inserting more `git_oid_tostr_s` calls) shortly
after using it.  Avoid it before invoking complex functions.
A simple hash-to-hexadigit formatter.
The index's checksum is not an object ID, so we should not use the
`git_oid` type.  Use a byte array for checksum calculation and storage.

Deprecate the `git_index_checksum` function without a replacement.  This
is an abstraction that callers should not care about (and indeed do not
seem to be using).

Remove the unused `git_index__changed_relative_to` function.
The index's checksum is not an object ID, so we should not use the
`git_oid` type.  Use a byte array for checksum calculation and storage.

Deprecate the `git_indexer_hash` function.  Callers should use the new
`git_indexer_name` function which provides a unique packfile name.
Deprecate the `git_packfile_hash` function.  Callers should use the new
`git_packfile_name` function which provides a unique packfile name.
@ethomson ethomson merged commit d9863fc into main Feb 6, 2022
@ethomson ethomson deleted the ethomson/sha256_preparation branch February 6, 2022 20:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant
0