107
struct object_id oid;
108
int baselen, len;
109
unsigned mode;
110
- int stage;
110
char path[FLEX_ARRAY];
111
};
112
137
}
138
139
static int write_archive_entry(const struct object_id *oid, const char *base,
141
- int baselen, const char *filename, unsigned mode, int stage,
140
+ int baselen, const char *filename, unsigned mode,
141
void *context)
142
{
143
static struct strbuf path = STRBUF_INIT;
196
197
static void queue_directory(const unsigned char *sha1,
198
struct strbuf *base, const char *filename,
200
- unsigned mode, int stage, struct archiver_context *c)
199
+ unsigned mode, struct archiver_context *c)
200
{
201
struct directory *d;
202
size_t len = st_add4(base->len, 1, strlen(filename), 1);
204
d->up = c->bottom;
205
d->baselen = base->len;
206
d->mode = mode;
208
- d->stage = stage;
207
c->bottom = d;
208
d->len = xsnprintf(d->path, len, "%.*s%s/", (int)base->len, base->buf, filename);
209
hashcpy(d->oid.hash, sha1);
222
write_directory(c) ||
223
write_archive_entry(&d->oid, d->path, d->baselen,
224
d->path + d->baselen, d->mode,
227
- d->stage, c) != READ_TREE_RECURSIVE;
225
+ c) != READ_TREE_RECURSIVE;
226
free(d);
227
return ret ? -1 : 0;
228
}
254
if (check_attr_export_ignore(check))
255
return 0;
256
queue_directory(oid->hash, base, filename,
259
- mode, stage, c);
257
+ mode, c);
258
return READ_TREE_RECURSIVE;
259
}
260
261
if (write_directory(c))
262
return -1;
263
return write_archive_entry(oid, base->buf, base->len, filename, mode,
266
- stage, context);
264
+ context);
265
}
266
267
struct extra_file_info {
375
};
376
377
static int reject_entry(const struct object_id *oid, struct strbuf *base,
380
- const char *filename, unsigned mode,
381
- int stage, void *context)
378
+ const char *filename, unsigned mode, int stage,
379
+ void *context)
380
{
381
int ret = -1;
382
struct path_exists_context *ctx = context;