summaryrefslogtreecommitdiff
path: root/grep.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2012-09-29 11:59:52 -0700
committerJunio C Hamano <gitster@pobox.com>2012-09-29 12:07:04 -0700
commitbaa6378ff2106738c74213280904507d0ed8129c (patch)
treef658d6228f0bf0b4ad34c03d79de46427243b1d1 /grep.c
parent72fd13f71c18b438ca3e482c126bcbcaa2dac650 (diff)
downloadgit-baa6378ff2106738c74213280904507d0ed8129c.tar.gz
log --grep-reflog: reject the option without -g
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'grep.c')
-rw-r--r--grep.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/grep.c b/grep.c
index d70dcdf0ef..edc7776677 100644
--- a/grep.c
+++ b/grep.c
@@ -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);
}