From: Michael J Gruber Date: Fri, 14 Sep 2012 09:46:35 +0000 (+0200) Subject: grep: show --debug output only once X-Git-Tag: v1.7.12.2~2^2~9 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=208f5aa42615671bae1e55de20a58d9ba046d3e8;p=thirdparty%2Fgit.git grep: show --debug output only once When threaded grep is in effect, the patterns are duplicated and recompiled for each thread. Avoid "--debug" output during the recompilation so that the output is given once instead of "1+nthreads" times. Signed-off-by: Michael J Gruber Signed-off-by: Junio C Hamano --- diff --git a/builtin/grep.c b/builtin/grep.c index 8aea00c048..a7e8df0d40 100644 --- a/builtin/grep.c +++ b/builtin/grep.c @@ -209,6 +209,7 @@ static void start_threads(struct grep_opt *opt) int err; struct grep_opt *o = grep_opt_dup(opt); o->output = strbuf_out; + o->debug = 0; compile_grep_patterns(o); err = pthread_create(&threads[i], NULL, run, o);