aboutsummaryrefslogtreecommitdiffstats
path: root/csum-file.h
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2025-01-31 10:05:46 -0800
committerJunio C Hamano <gitster@pobox.com>2025-01-31 10:05:46 -0800
commit0cbcba54550b1ea108e977c24b835e07b96b1c0e (patch)
tree6cb525c7fdb38ee631d741c2f32bcaf2fffa5f07 /csum-file.h
parentThe fifth batch (diff)
parenthash.h: drop unsafe_ function variants (diff)
downloadgit-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.h2
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 *);