From 9c34eb93fba703e74f06d20f5b36a1a5e3dc6486 Mon Sep 17 00:00:00 2001 From: Patrick Steinhardt Date: Fri, 14 Jun 2024 08:50:13 +0200 Subject: hash: require hash algorithm in `is_empty_{blob,tree}_oid()` Both functions `is_empty_{blob,tree}_oid()` 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 Signed-off-by: Junio C Hamano --- diffcore-rename.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'diffcore-rename.c') diff --git a/diffcore-rename.c b/diffcore-rename.c index 5a6e2bcac7..5abb958651 100644 --- a/diffcore-rename.c +++ b/diffcore-rename.c @@ -1422,7 +1422,7 @@ void diffcore_rename_extended(struct diff_options *options, strcmp(options->single_follow, p->two->path)) continue; /* not interested */ else if (!options->flags.rename_empty && - is_empty_blob_oid(&p->two->oid)) + is_empty_blob_oid(&p->two->oid, the_repository->hash_algo)) continue; else if (add_rename_dst(p) < 0) { warning("skipping rename detection, detected" @@ -1432,7 +1432,7 @@ void diffcore_rename_extended(struct diff_options *options, } } else if (!options->flags.rename_empty && - is_empty_blob_oid(&p->one->oid)) + is_empty_blob_oid(&p->one->oid, the_repository->hash_algo)) continue; else if (!DIFF_PAIR_UNMERGED(p) && !DIFF_FILE_VALID(p->two)) { /* -- cgit v1.2.3