summaryrefslogtreecommitdiff
path: root/midx.c
diff options
context:
space:
mode:
authorbrian m. carlson <sandals@crustytoothpaste.net>2021-04-26 01:02:50 (GMT)
committerJunio C Hamano <gitster@pobox.com>2021-04-27 07:31:38 (GMT)
commit92e2cab96b8b8ea9a076dc279864226b3d0863e9 (patch)
treee0bf6b151c7624d1a751eedcf0247a47c3284709 /midx.c
parentcf0983213c72727c4c7dea51ed9b3b38a2968fbe (diff)
downloadgit-92e2cab96b8b8ea9a076dc279864226b3d0863e9.zip
git-92e2cab96b8b8ea9a076dc279864226b3d0863e9.tar.gz
git-92e2cab96b8b8ea9a076dc279864226b3d0863e9.tar.bz2
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 'midx.c')
-rw-r--r--midx.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/midx.c b/midx.c
index 9e86583..21d6a05 100644
--- a/midx.c
+++ b/midx.c
@@ -247,7 +247,7 @@ struct object_id *nth_midxed_object_oid(struct object_id *oid,
if (n >= m->num_objects)
return NULL;
- hashcpy(oid->hash, m->chunk_oid_lookup + m->hash_len * n);
+ oidread(oid, m->chunk_oid_lookup + m->hash_len * n);
return oid;
}