-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: improved gitoid_from_buffer, misc. fixups
This commit does a few things: - Refactors gitoid_from_buffer to delegate to BufReader. - Uses format_bytes::format_bytes instead of format to construct prefix for hashing. - Adds GitOid::from_reader_with_expected_length to support non-Seek-able readers and avoid cost of seeking if length is already known. - Adds GITOID_URL_SCHEME constant to replace two uses of literal string and ensure they're always consistent. - Updates FFI to support new from_reader_with_expected_length - Updates FFI to avoid double-buffering when building a GitOid from a reader, since the underlying implementation buffers. - Adds FFI support for new from_reader_with_expected_length constructor. - Renames FFI constructor from _new_from_* to _from_*, and updates C test code to use the new prefix.
- Loading branch information
1 parent
da66cf6
commit 0b8ea1d
Showing
6 changed files
with
193 additions
and
91 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.