mirror of
https://github.com/git/git.git
synced 2025-12-12 20:36:24 +01:00
csum-file: store the hash algorithm as a struct field
Throughout the hashfile API, we rely on a reference to 'the_hash_algo', and call its _unsafe function variants directly. Prepare for a future change where we may use a different 'git_hash_algo' pointer (instead of just relying on 'the_hash_algo' throughout) by making the 'git_hash_algo' pointer a member of the 'hashfile' structure itself. Signed-off-by: Taylor Blau <me@ttaylorr.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
d9213e4716
commit
48524fac64
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user