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 /builtin/fetch-pack.c | |
| parent | f4836570a7adbd8c70ad7a8edf6ae5a977647c06 (diff) | |
| download | git-9da95bda74cf10e1475384a71fd20914c3b99784.tar.gz | |
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 'builtin/fetch-pack.c')
| -rw-r--r-- | builtin/fetch-pack.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/builtin/fetch-pack.c b/builtin/fetch-pack.c index 44c05ee86c..af329e8d5c 100644 --- a/builtin/fetch-pack.c +++ b/builtin/fetch-pack.c @@ -29,11 +29,11 @@ static void add_sought_entry(struct ref ***sought, int *nr, int *alloc, ; /* <oid>, leave oid as name */ } else { /* <ref>, clear cruft from oid */ - oidclr(&oid); + oidclr(&oid, the_repository->hash_algo); } } else { /* <ref>, clear cruft from get_oid_hex */ - oidclr(&oid); + oidclr(&oid, the_repository->hash_algo); } ref = alloc_ref(name); |
