From: Junio C Hamano Date: Tue, 14 Feb 2012 20:57:18 +0000 (-0800) Subject: Merge branch 'jk/grep-binary-attribute' X-Git-Tag: v1.7.10-rc0~79 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=10439fc0effb194e1ce2cd4db8fbd69cfaf23656;p=git.git Merge branch 'jk/grep-binary-attribute' * jk/grep-binary-attribute: grep: pre-load userdiff drivers when threaded grep: load file data after checking binary-ness grep: respect diff attributes for binary-ness grep: cache userdiff_driver in grep_source grep: drop grep_buffer's "name" parameter convert git-grep to use grep_source interface grep: refactor the concept of "grep source" into an object grep: move sha1-reading mutex into low-level code grep: make locking flag global --- 10439fc0effb194e1ce2cd4db8fbd69cfaf23656 diff --cc builtin/grep.c index dc6de83ab,e741aca18..e4ea90078 --- a/builtin/grep.c +++ b/builtin/grep.c @@@ -1027,13 -921,10 +918,11 @@@ int cmd_grep(int argc, const char **arg use_threads = 0; #endif - opt.use_threads = use_threads; - #ifndef NO_PTHREADS if (use_threads) { - if (opt.pre_context || opt.post_context || opt.file_break || - opt.funcbody) + if (!(opt.name_only || opt.unmatch_name_only || opt.count) + && (opt.pre_context || opt.post_context || + opt.file_break || opt.funcbody)) skip_first_line = 1; start_threads(&opt); }