From 0843acfd2c32dd8a8594731a0090d0934ccb123b Mon Sep 17 00:00:00 2001 From: Jeff King Date: Mon, 25 Aug 2008 02:15:05 -0400 Subject: Fix "git log -i --grep" This has been broken in v1.6.0 due to the reorganization of the revision option parsing code. The "-i" is completely ignored, but works fine in "git log --grep -i". What happens is that the code for "-i" looks for revs->grep_filter; if it is NULL, we do nothing, since there are no grep filters. But that is obviously not correct, since we want it to influence the later --grep option. Doing it the other way around works, since "-i" just impacts the existing grep_filter option. Instead, we now always initialize the grep_filter member and just fill in options and patterns as we get them. This means that we can no longer check grep_filter for NULL, but instead must check the pattern list to see if we have any actual patterns. Signed-off-by: Jeff King Signed-off-by: Junio C Hamano --- builtin-rev-list.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'builtin-rev-list.c') diff --git a/builtin-rev-list.c b/builtin-rev-list.c index 893762c80f..c023003b2b 100644 --- a/builtin-rev-list.c +++ b/builtin-rev-list.c @@ -645,7 +645,8 @@ int cmd_rev_list(int argc, const char **argv, const char *prefix) revs.diff) usage(rev_list_usage); - save_commit_buffer = revs.verbose_header || revs.grep_filter; + save_commit_buffer = revs.verbose_header || + revs.grep_filter.pattern_list; if (bisect_list) revs.limited = 1; -- cgit v1.2.3