summaryrefslogtreecommitdiffstats
path: root/grep.c
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2012-09-29 20:59:52 +0200
committerJunio C Hamano <gitster@pobox.com>2012-09-29 21:07:04 +0200
commitbaa6378ff2106738c74213280904507d0ed8129c (patch)
treef658d6228f0bf0b4ad34c03d79de46427243b1d1 /grep.c
parentrevision: add --grep-reflog to filter commits by reflog messages (diff)
downloadgit-baa6378ff2106738c74213280904507d0ed8129c.tar.xz
git-baa6378ff2106738c74213280904507d0ed8129c.zip
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);
}