diff options
author | Junio C Hamano <gitster@pobox.com> | 2021-09-10 11:46:31 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2021-09-10 11:46:31 -0700 |
commit | 05665a0dff77b5fc49e8e94b15087fb630a10ab0 (patch) | |
tree | cca0de52e4981ca76db1cb04c46d7652e65a1523 /archive.c | |
parent | Merge branch 'rs/show-branch-simplify' (diff) | |
parent | archive: convert queue_directory to struct object_id (diff) | |
download | tgif-05665a0dff77b5fc49e8e94b15087fb630a10ab0.tar.xz |
Merge branch 'rs/archive-use-object-id'
Code cleanup.
* rs/archive-use-object-id:
archive: convert queue_directory to struct object_id
Diffstat (limited to 'archive.c')
-rw-r--r-- | archive.c | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -191,7 +191,7 @@ static int write_archive_entry(const struct object_id *oid, const char *base, return err; } -static void queue_directory(const unsigned char *sha1, +static void queue_directory(const struct object_id *oid, struct strbuf *base, const char *filename, unsigned mode, struct archiver_context *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); - oidread(&d->oid, sha1); + oidcpy(&d->oid, oid); } static int write_directory(struct archiver_context *c) @@ -250,8 +250,7 @@ static int queue_or_write_archive_entry(const struct object_id *oid, if (check_attr_export_ignore(check)) return 0; - queue_directory(oid->hash, base, filename, - mode, c); + queue_directory(oid, base, filename, mode, c); return READ_TREE_RECURSIVE; } |