MCPcopy Index your code
hub / github.com/git/git / queue_directory

Function queue_directory

archive.c:230–243  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

228}
229
230static void queue_directory(const struct object_id *oid,
231 struct strbuf *base, const char *filename,
232 unsigned mode, struct archiver_context *c)
233{
234 struct directory *d;
235 size_t len = st_add4(base->len, 1, strlen(filename), 1);
236 d = xmalloc(st_add(sizeof(*d), len));
237 d->up = c->bottom;
238 d->baselen = base->len;
239 d->mode = mode;
240 c->bottom = d;
241 d->len = xsnprintf(d->path, len, "%.*s%s/", (int)base->len, base->buf, filename);
242 oidcpy(&d->oid, oid);
243}
244
245static int write_directory(struct archiver_context *c)
246{

Callers 1

Calls 4

st_addFunction · 0.85
xsnprintfFunction · 0.85
oidcpyFunction · 0.85
xmallocFunction · 0.70

Tested by

no test coverage detected