summaryrefslogtreecommitdiffstats
path: root/apply.c
diff options
context:
space:
mode:
authorPatrick Steinhardt <ps@pks.im>2024-06-14 08:49:54 +0200
committerJunio C Hamano <gitster@pobox.com>2024-06-14 19:26:32 +0200
commit9da95bda74cf10e1475384a71fd20914c3b99784 (patch)
treefb145c3883d83c86ecf5bf7fa188937afe77b1e0 /apply.c
parenthash: require hash algorithm in `hasheq()`, `hashcmp()` and `hashclr()` (diff)
downloadgit-9da95bda74cf10e1475384a71fd20914c3b99784.tar.xz
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 'apply.c')
-rw-r--r--apply.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/apply.c b/apply.c
index 901b67e625..528939abb6 100644
--- a/apply.c
+++ b/apply.c
@@ -3680,7 +3680,7 @@ static int try_threeway(struct apply_state *state,
if (status) {
patch->conflicted_threeway = 1;
if (patch->is_new)
- oidclr(&patch->threeway_stage[0]);
+ oidclr(&patch->threeway_stage[0], the_repository->hash_algo);
else
oidcpy(&patch->threeway_stage[0], &pre_oid);
oidcpy(&patch->threeway_stage[1], &our_oid);