summaryrefslogtreecommitdiff
path: root/archive.c
diff options
context:
space:
mode:
Diffstat (limited to 'archive.c')
-rw-r--r--archive.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/archive.c b/archive.c
index 2956155..ff2bb54 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)
@@ -275,9 +275,11 @@ int write_archive_entries(struct archiver_args *args,
int err;
struct strbuf path_in_archive = STRBUF_INIT;
struct strbuf content = STRBUF_INIT;
- struct object_id fake_oid = null_oid;
+ struct object_id fake_oid;
int i;
+ oidcpy(&fake_oid, null_oid());
+
if (args->baselen > 0 && args->base[args->baselen - 1] == '/') {
size_t len = args->baselen;