log --grep-reflog: reject the option without -g

Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:
Junio C Hamano
2012-09-29 11:59:52 -07:00
parent 72fd13f71c
commit baa6378ff2
5 changed files with 20 additions and 4 deletions

2
grep.c
View File

@ -64,6 +64,8 @@ void append_header_grep_pattern(struct grep_opt *opt,
{
struct grep_pat *p = create_grep_pat(pat, strlen(pat), "header", 0,
GREP_PATTERN_HEAD, field);
if (field == GREP_HEADER_REFLOG)
opt->use_reflog_filter = 1;
do_append_grep_pat(&opt->header_tail, p);
}