diff options
Diffstat (limited to 'revision.c')
-rw-r--r-- | revision.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/revision.c b/revision.c index a8f0aa4c6..29721ecf8 100644 --- a/revision.c +++ b/revision.c @@ -826,6 +826,7 @@ void init_revisions(struct rev_info *revs, const char *prefix) revs->grep_filter.status_only = 1; revs->grep_filter.pattern_tail = &(revs->grep_filter.pattern_list); + revs->grep_filter.header_tail = &(revs->grep_filter.header_list); revs->grep_filter.regflags = REG_NEWLINE; diff_setup(&revs->diffopt); @@ -1804,7 +1805,7 @@ static int rewrite_parents(struct rev_info *revs, struct commit *commit) static int commit_match(struct commit *commit, struct rev_info *opt) { - if (!opt->grep_filter.pattern_list) + if (!opt->grep_filter.pattern_list && !opt->grep_filter.header_list) return 1; return grep_buffer(&opt->grep_filter, NULL, /* we say nothing, not even filename */ |