@@ -533,8 +533,6 @@ static int git_log_config(const char *var, const char *value, void *cb)
533533 return 0 ;
534534 }
535535
536- if (grep_config (var , value , cb ) < 0 )
537- return -1 ;
538536 if (git_gpg_config (var , value , cb ) < 0 )
539537 return -1 ;
540538 return git_diff_ui_config (var , value , cb );
@@ -549,6 +547,8 @@ int cmd_whatchanged(int argc, const char **argv, const char *prefix)
549547 git_config (git_log_config , NULL );
550548
551549 repo_init_revisions (the_repository , & rev , prefix );
550+ git_config (grep_config , & rev .grep_filter );
551+
552552 rev .diff = 1 ;
553553 rev .simplify_history = 0 ;
554554 memset (& opt , 0 , sizeof (opt ));
@@ -663,6 +663,8 @@ int cmd_show(int argc, const char **argv, const char *prefix)
663663
664664 memset (& match_all , 0 , sizeof (match_all ));
665665 repo_init_revisions (the_repository , & rev , prefix );
666+ git_config (grep_config , & rev .grep_filter );
667+
666668 rev .diff = 1 ;
667669 rev .always_show_header = 1 ;
668670 rev .no_walk = 1 ;
@@ -746,6 +748,8 @@ int cmd_log_reflog(int argc, const char **argv, const char *prefix)
746748
747749 repo_init_revisions (the_repository , & rev , prefix );
748750 init_reflog_walk (& rev .reflog_info );
751+ git_config (grep_config , & rev .grep_filter );
752+
749753 rev .verbose_header = 1 ;
750754 memset (& opt , 0 , sizeof (opt ));
751755 opt .def = "HEAD" ;
@@ -779,6 +783,8 @@ int cmd_log(int argc, const char **argv, const char *prefix)
779783 git_config (git_log_config , NULL );
780784
781785 repo_init_revisions (the_repository , & rev , prefix );
786+ git_config (grep_config , & rev .grep_filter );
787+
782788 rev .always_show_header = 1 ;
783789 memset (& opt , 0 , sizeof (opt ));
784790 opt .def = "HEAD" ;
@@ -1861,10 +1867,13 @@ int cmd_format_patch(int argc, const char **argv, const char *prefix)
18611867 extra_hdr .strdup_strings = 1 ;
18621868 extra_to .strdup_strings = 1 ;
18631869 extra_cc .strdup_strings = 1 ;
1870+
18641871 init_log_defaults ();
18651872 init_display_notes (& notes_opt );
18661873 git_config (git_format_config , NULL );
18671874 repo_init_revisions (the_repository , & rev , prefix );
1875+ git_config (grep_config , & rev .grep_filter );
1876+
18681877 rev .show_notes = show_notes ;
18691878 memcpy (& rev .notes_opt , & notes_opt , sizeof (notes_opt ));
18701879 rev .commit_format = CMIT_FMT_EMAIL ;
0 commit comments