mirror of
https://github.com/git/git.git
synced 2026-01-09 17:46:37 +00:00
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>
This commit is contained in:
committed by
Junio C Hamano
parent
f4836570a7
commit
9da95bda74
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user