| 342 | } |
| 343 | |
| 344 | static void traverse_non_commits(struct traversal_context *ctx, |
| 345 | struct strbuf *base) |
| 346 | { |
| 347 | assert(base->len == 0); |
| 348 | |
| 349 | for (size_t i = 0; i < ctx->revs->pending.nr; i++) { |
| 350 | struct object_array_entry *pending = ctx->revs->pending.objects + i; |
| 351 | struct object *obj = pending->item; |
| 352 | const char *name = pending->name; |
| 353 | const char *path = pending->path; |
| 354 | if (obj->flags & (UNINTERESTING | SEEN)) |
| 355 | continue; |
| 356 | if (obj->type == OBJ_TAG) { |
| 357 | process_tag(ctx, (struct tag *)obj, name); |
| 358 | continue; |
| 359 | } |
| 360 | if (!path) |
| 361 | path = ""; |
| 362 | if (obj->type == OBJ_TREE) { |
| 363 | ctx->depth = 0; |
| 364 | process_tree(ctx, (struct tree *)obj, base, path); |
| 365 | continue; |
| 366 | } |
| 367 | if (obj->type == OBJ_BLOB) { |
| 368 | process_blob(ctx, (struct blob *)obj, base, path); |
| 369 | continue; |
| 370 | } |
| 371 | die("unknown pending object %s (%s)", |
| 372 | oid_to_hex(&obj->oid), name); |
| 373 | } |
| 374 | object_array_clear(&ctx->revs->pending); |
| 375 | } |
| 376 | |
| 377 | static void do_traverse(struct traversal_context *ctx) |
| 378 | { |
no test coverage detected