mirror of
https://github.com/git/git.git
synced 2026-01-09 17:46:37 +00:00
Always use oidread to read into struct object_id
In the future, we'll want oidread to automatically set the hash algorithm member for an object ID we read into it, so ensure we use oidread instead of hashcpy everywhere we're copying a hash value into a struct object_id. Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
committed by
Junio C Hamano
parent
cf0983213c
commit
92e2cab96b
@@ -49,7 +49,7 @@ static int decode_tree_entry(struct tree_desc *desc, const char *buf, unsigned l
|
||||
desc->entry.path = path;
|
||||
desc->entry.mode = canon_mode(mode);
|
||||
desc->entry.pathlen = len - 1;
|
||||
hashcpy(desc->entry.oid.hash, (const unsigned char *)path + len);
|
||||
oidread(&desc->entry.oid, (const unsigned char *)path + len);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user