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 /tree-walk.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 'tree-walk.c')
| -rw-r--r-- | tree-walk.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tree-walk.c b/tree-walk.c index 6565d9ad99..535a3a2539 100644 --- a/tree-walk.c +++ b/tree-walk.c @@ -38,8 +38,8 @@ static int decode_tree_entry(struct tree_desc *desc, const char *buf, unsigned l desc->entry.path = path; desc->entry.mode = (desc->flags & TREE_DESC_RAW_MODES) ? mode : canon_mode(mode); desc->entry.pathlen = len - 1; - oidread_algop(&desc->entry.oid, (const unsigned char *)path + len, - desc->algo); + oidread(&desc->entry.oid, (const unsigned char *)path + len, + desc->algo); return 0; } |
