From: Junio C Hamano Date: Tue, 21 Feb 2012 22:57:05 +0000 (-0800) Subject: Merge branch 'jk/grep-binary-attribute' into maint X-Git-Tag: v1.7.9.2~12 X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=6f61eb201799ee83c3a82f1f097c18b3854c0c03;p=git.git Merge branch 'jk/grep-binary-attribute' into maint * 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 --- 6f61eb201799ee83c3a82f1f097c18b3854c0c03 diff --cc builtin/grep.c index 5c2ae94e5,e741aca18..9fc3e95cc --- a/builtin/grep.c +++ b/builtin/grep.c @@@ -1030,13 -921,10 +921,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); }