| 400 | }; |
| 401 | |
| 402 | static int reject_entry(const struct object_id *oid UNUSED, |
| 403 | struct strbuf *base, |
| 404 | const char *filename, unsigned mode, |
| 405 | void *context) |
| 406 | { |
| 407 | int ret = -1; |
| 408 | struct path_exists_context *ctx = context; |
| 409 | |
| 410 | if (S_ISDIR(mode)) { |
| 411 | struct strbuf sb = STRBUF_INIT; |
| 412 | strbuf_addbuf(&sb, base); |
| 413 | strbuf_addstr(&sb, filename); |
| 414 | if (!match_pathspec(ctx->args->repo->index, |
| 415 | &ctx->pathspec, |
| 416 | sb.buf, sb.len, 0, NULL, 1)) |
| 417 | ret = READ_TREE_RECURSIVE; |
| 418 | strbuf_release(&sb); |
| 419 | } |
| 420 | return ret; |
| 421 | } |
| 422 | |
| 423 | static int reject_outside(const struct object_id *oid UNUSED, |
| 424 | struct strbuf *base, const char *filename, |
nothing calls this directly
no test coverage detected