| 295 | } |
| 296 | |
| 297 | static int grep_cmd_config(const char *var, const char *value, |
| 298 | const struct config_context *ctx, void *cb) |
| 299 | { |
| 300 | int st = grep_config(var, value, ctx, cb); |
| 301 | |
| 302 | if (git_color_config(var, value, cb) < 0) |
| 303 | st = -1; |
| 304 | else if (git_default_config(var, value, ctx, cb) < 0) |
| 305 | st = -1; |
| 306 | |
| 307 | if (!strcmp(var, "grep.threads")) { |
| 308 | num_threads = git_config_int(var, value, ctx->kvi); |
| 309 | if (num_threads < 0) |
| 310 | die(_("invalid number of threads specified (%d) for %s"), |
| 311 | num_threads, var); |
| 312 | else if (!HAVE_THREADS && num_threads > 1) { |
| 313 | /* |
| 314 | * TRANSLATORS: %s is the configuration |
| 315 | * variable for tweaking threads, currently |
| 316 | * grep.threads |
| 317 | */ |
| 318 | warning(_("no threads support, ignoring %s"), var); |
| 319 | num_threads = 1; |
| 320 | } |
| 321 | } |
| 322 | |
| 323 | if (!strcmp(var, "submodule.recurse")) |
| 324 | recurse_submodules = git_config_bool(var, value); |
| 325 | |
| 326 | return st; |
| 327 | } |
| 328 | |
| 329 | static void grep_source_name(struct grep_opt *opt, const char *filename, |
| 330 | int tree_name_len, struct strbuf *out) |
nothing calls this directly
no test coverage detected