diff options
| author | Patrick Steinhardt <ps@pks.im> | 2024-06-14 08:49:54 +0200 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2024-06-14 10:26:32 -0700 |
| commit | 9da95bda74cf10e1475384a71fd20914c3b99784 (patch) | |
| tree | fb145c3883d83c86ecf5bf7fa188937afe77b1e0 /split-index.c | |
| parent | hash: require hash algorithm in `hasheq()`, `hashcmp()` and `hashclr()` (diff) | |
| download | git-9da95bda74cf10e1475384a71fd20914c3b99784.tar.gz git-9da95bda74cf10e1475384a71fd20914c3b99784.zip | |
hash: require hash algorithm in `oidread()` and `oidclr()`
Both `oidread()` and `oidclr()` use `the_repository` to derive the hash
function that shall be used. Require callers to pass in the hash
algorithm to get rid of this implicit dependency.
Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'split-index.c')
| -rw-r--r-- | split-index.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/split-index.c b/split-index.c index 8c38687c04..058a8f448e 100644 --- a/split-index.c +++ b/split-index.c @@ -29,7 +29,7 @@ int read_link_extension(struct index_state *istate, if (sz < the_hash_algo->rawsz) return error("corrupt link extension (too short)"); si = init_split_index(istate); - oidread(&si->base_oid, data); + oidread(&si->base_oid, data, the_repository->hash_algo); data += the_hash_algo->rawsz; sz -= the_hash_algo->rawsz; if (!sz) |
