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 <git@drmicha.warpmail.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Michael J Gruber committed Sep 14, 2012 at 11:46 UTC 208f5aa42615671bae1e55de20a58d9ba046d3e8
1 file changed +1
builtin/grep.c
+1
@@ -209,6 +209,7 @@ static void start_threads(struct grep_opt *opt)
209 int err;
210 struct grep_opt *o = grep_opt_dup(opt);
211 o->output = strbuf_out;
212 + o->debug = 0;
213 compile_grep_patterns(o);
214 err = pthread_create(&threads[i], NULL, run, o);
215