Code

Merge branch 'jk/grep-binary-attribute' into maint
authorJunio C Hamano <gitster@pobox.com>
Tue, 21 Feb 2012 22:57:05 +0000 (14:57 -0800)
committerJunio C Hamano <gitster@pobox.com>
Tue, 21 Feb 2012 22:57:05 +0000 (14: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 5c2ae94e5576f2e8af1f8509b789a67851db2598,e741aca18cc1c9c3e5cfef3db996d05956bedc2d..9fc3e95cc610c9df7d2b17eae59ac2c161443982
@@@ -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);
        }
diff --cc revision.c
Simple merge