File tree Expand file tree Collapse file tree 1 file changed +6
-5
lines changed
Expand file tree Collapse file tree 1 file changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -266,9 +266,8 @@ sub do_search ( $self, %opts ) {
266266
267267 my $t0 = [Time::HiRes::gettimeofday];
268268
269- my $gitdir = $self -> git()-> work_tree;
270-
271269 $search = _sanitize_search($search );
270+ $opts {search } = $search ;
272271
273272 # Validate regex before running git grep — invalid PCRE would silently
274273 # return empty results, confusing users.
@@ -964,9 +963,11 @@ sub run_git_cmd_limit ( $self, %opts ) {
964963 last if ++$counter > $limit_bg_process ;
965964 }
966965 $run -> close ;
967- print {$to_cache }
968- qq{ \n } ; # in case of the last line did not had a newline
969- print {$to_cache } END_OF_FILE_MARKER() . qq{ \n } if $cache_file ;
966+ if ($cache_file ) {
967+ print {$to_cache }
968+ qq{ \n } ; # in case of the last line did not had a newline
969+ print {$to_cache } END_OF_FILE_MARKER() . qq{ \n } ;
970+ }
970971 print {$CW } END_OF_FILE_MARKER() . qq{ \n } if $can_write_to_pipe ;
971972 say " -- Request finished by kid: $counter lines - "
972973 . join ( ' ' , ' git' , @$cmd );
You can’t perform that action at this time.
0 commit comments