Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbrian m. carlson <sandals@crustytoothpaste.net>2021-04-26 04:02:50 +0300
committerJunio C Hamano <gitster@pobox.com>2021-04-27 10:31:38 +0300
commit92e2cab96b8b8ea9a076dc279864226b3d0863e9 (patch)
treee0bf6b151c7624d1a751eedcf0247a47c3284709 /tree-walk.c
parentcf0983213c72727c4c7dea51ed9b3b38a2968fbe (diff)
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>
Diffstat (limited to 'tree-walk.c')
-rw-r--r--tree-walk.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tree-walk.c b/tree-walk.c
index 2d6226d5f1..3a94959d64 100644
--- a/tree-walk.c
+++ b/tree-walk.c
@@ -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;
}