Code

Merge branch 'jk/grep-binary-attribute'
authorJunio C Hamano <gitster@pobox.com>
Tue, 14 Feb 2012 20:57:18 +0000 (12:57 -0800)
committerJunio C Hamano <gitster@pobox.com>
Tue, 14 Feb 2012 20:57:18 +0000 (12:57 -0800)
* 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

1  2 
builtin/grep.c
revision.c

diff --cc builtin/grep.c
index dc6de83ab7c8178fc14d9e27679cb0b22f9caba3,e741aca18cc1c9c3e5cfef3db996d05956bedc2d..e4ea90078384f198f5985596c64deb5f423e9e45
@@@ -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);
        }
diff --cc revision.c
Simple merge