summaryrefslogtreecommitdiffstats
path: root/archive.c
diff options
context:
space:
mode:
authorbrian m. carlson <sandals@crustytoothpaste.net>2021-04-26 03:02:50 +0200
committerJunio C Hamano <gitster@pobox.com>2021-04-27 09:31:38 +0200
commit92e2cab96b8b8ea9a076dc279864226b3d0863e9 (patch)
treee0bf6b151c7624d1a751eedcf0247a47c3284709 /archive.c
parenthash: add an algo member to struct object_id (diff)
downloadgit-92e2cab96b8b8ea9a076dc279864226b3d0863e9.tar.xz
git-92e2cab96b8b8ea9a076dc279864226b3d0863e9.zip
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 'archive.c')
-rw-r--r--archive.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/archive.c b/archive.c
index 295615580d..6cfb9e42d6 100644
--- a/archive.c
+++ b/archive.c
@@ -203,7 +203,7 @@ static void queue_directory(const unsigned char *sha1,
d->mode = mode;
c->bottom = d;
d->len = xsnprintf(d->path, len, "%.*s%s/", (int)base->len, base->buf, filename);
- hashcpy(d->oid.hash, sha1);
+ oidread(&d->oid, sha1);
}
static int write_directory(struct archiver_context *c)