diff options
| author | Junio C Hamano <gitster@pobox.com> | 2025-01-31 10:05:46 -0800 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2025-01-31 10:05:46 -0800 |
| commit | 0cbcba54550b1ea108e977c24b835e07b96b1c0e (patch) | |
| tree | 6cb525c7fdb38ee631d741c2f32bcaf2fffa5f07 /csum-file.h | |
| parent | The fifth batch (diff) | |
| parent | hash.h: drop unsafe_ function variants (diff) | |
| download | git-0cbcba54550b1ea108e977c24b835e07b96b1c0e.tar.gz git-0cbcba54550b1ea108e977c24b835e07b96b1c0e.zip | |
Merge branch 'tb/unsafe-hash-cleanup' into ps/hash-cleanup
* tb/unsafe-hash-cleanup:
hash.h: drop unsafe_ function variants
csum-file: introduce hashfile_checkpoint_init()
t/helper/test-hash.c: use unsafe_hash_algo()
csum-file.c: use unsafe_hash_algo()
hash.h: introduce `unsafe_hash_algo()`
csum-file.c: extract algop from hashfile_checksum_valid()
csum-file: store the hash algorithm as a struct field
t/helper/test-tool: implement sha1-unsafe helper
Diffstat (limited to 'csum-file.h')
| -rw-r--r-- | csum-file.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/csum-file.h b/csum-file.h index 7c73da0a40..b7475f16c2 100644 --- a/csum-file.h +++ b/csum-file.h @@ -20,6 +20,7 @@ struct hashfile { size_t buffer_len; unsigned char *buffer; unsigned char *check_buffer; + const struct git_hash_algo *algop; /** * If non-zero, skip_hash indicates that we should @@ -35,6 +36,7 @@ struct hashfile_checkpoint { git_hash_ctx ctx; }; +void hashfile_checkpoint_init(struct hashfile *, struct hashfile_checkpoint *); void hashfile_checkpoint(struct hashfile *, struct hashfile_checkpoint *); int hashfile_truncate(struct hashfile *, struct hashfile_checkpoint *); |
