| 414 | } |
| 415 | |
| 416 | static int git_config_include(const char *var, const char *value, |
| 417 | const struct config_context *ctx, |
| 418 | void *data) |
| 419 | { |
| 420 | struct config_include_data *inc = data; |
| 421 | const char *cond, *key; |
| 422 | size_t cond_len; |
| 423 | int ret; |
| 424 | |
| 425 | /* |
| 426 | * Pass along all values, including "include" directives; this makes it |
| 427 | * possible to query information on the includes themselves. |
| 428 | */ |
| 429 | ret = inc->fn(var, value, ctx, inc->data); |
| 430 | if (ret < 0) |
| 431 | return ret; |
| 432 | |
| 433 | if (!strcmp(var, "include.path")) |
| 434 | ret = handle_path_include(ctx->kvi, value, inc); |
| 435 | |
| 436 | if (!parse_config_key(var, "includeif", &cond, &cond_len, &key) && |
| 437 | cond && include_condition_is_true(ctx->kvi, inc, cond, cond_len) && |
| 438 | !strcmp(key, "path")) { |
| 439 | config_fn_t old_fn = inc->fn; |
| 440 | |
| 441 | if (inc->opts->unconditional_remote_url) |
| 442 | inc->fn = forbid_remote_url; |
| 443 | ret = handle_path_include(ctx->kvi, value, inc); |
| 444 | inc->fn = old_fn; |
| 445 | } |
| 446 | |
| 447 | return ret; |
| 448 | } |
| 449 | |
| 450 | static void git_config_push_split_parameter(const char *key, const char *value) |
| 451 | { |
nothing calls this directly
no test coverage detected