Skip to content

Commit 208f5aa

Browse files
Michael J Grubergitster
authored andcommitted
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 <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent 17bf35a commit 208f5aa

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

builtin/grep.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,7 @@ static void start_threads(struct grep_opt *opt)
209209
int err;
210210
struct grep_opt *o = grep_opt_dup(opt);
211211
o->output = strbuf_out;
212+
o->debug = 0;
212213
compile_grep_patterns(o);
213214
err = pthread_create(&threads[i], NULL, run, o);
214215

0 commit comments

Comments
 (0)