Skip to content

Commit 05665a0

Browse files
committed
Merge branch 'rs/archive-use-object-id'
Code cleanup. * rs/archive-use-object-id: archive: convert queue_directory to struct object_id
2 parents 09f66eb + e124ecf commit 05665a0

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

archive.c

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ static int write_archive_entry(const struct object_id *oid, const char *base,
191191
return err;
192192
}
193193

194-
static void queue_directory(const unsigned char *sha1,
194+
static void queue_directory(const struct object_id *oid,
195195
struct strbuf *base, const char *filename,
196196
unsigned mode, struct archiver_context *c)
197197
{
@@ -203,7 +203,7 @@ static void queue_directory(const unsigned char *sha1,
203203
d->mode = mode;
204204
c->bottom = d;
205205
d->len = xsnprintf(d->path, len, "%.*s%s/", (int)base->len, base->buf, filename);
206-
oidread(&d->oid, sha1);
206+
oidcpy(&d->oid, oid);
207207
}
208208

209209
static int write_directory(struct archiver_context *c)
@@ -250,8 +250,7 @@ static int queue_or_write_archive_entry(const struct object_id *oid,
250250

251251
if (check_attr_export_ignore(check))
252252
return 0;
253-
queue_directory(oid->hash, base, filename,
254-
mode, c);
253+
queue_directory(oid, base, filename, mode, c);
255254
return READ_TREE_RECURSIVE;
256255
}
257256

0 commit comments

Comments
 (0)