summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael J Gruber <git@drmicha.warpmail.net>2012-09-14 09:46:35 (GMT)
committerJunio C Hamano <gitster@pobox.com>2012-09-14 17:11:44 (GMT)
commit208f5aa42615671bae1e55de20a58d9ba046d3e8 (patch)
treee60f659648b7bedcfde233819f4867832cf0f77e
parent17bf35a3c7b46df7131681bcc5bee5f12e1caec4 (diff)
downloadgit-208f5aa42615671bae1e55de20a58d9ba046d3e8.zip
git-208f5aa42615671bae1e55de20a58d9ba046d3e8.tar.gz
git-208f5aa42615671bae1e55de20a58d9ba046d3e8.tar.bz2
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>
-rw-r--r--builtin/grep.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/builtin/grep.c b/builtin/grep.c
index 8aea00c..a7e8df0 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);