diff options
Diffstat (limited to 'archive.c')
-rw-r--r-- | archive.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -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; |