diff options
author | Christoph Junghans <ottxor@gentoo.org> | 2015-01-03 22:27:48 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2015-01-06 14:40:46 -0800 |
commit | a462402232aab7f44c46c614ac9c3d94c65b3831 (patch) | |
tree | 85a07d33076d743a7767f8524cd5eaddf74e9577 /grep.c | |
parent | c2e8e4b9da4d007b15faa2e3d407b2fd279f0572 (diff) | |
download | git-cj/grep-none-match.tar.gz |
git-log: added --none-match optioncj/grep-none-match
Implements a inverted match for "git log", like in the case of
"git grep -v", which is useful from time to time to e.g. filter
FIXUP message out of "git log".
Internally, a new bol 'none_match' has been introduces as
revs->grep_filter.invert inverts the match line-wise, which cannot
work as i.e. empty line always not match the pattern given.
Signed-off-by: Christoph Junghans <ottxor@gentoo.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'grep.c')
-rw-r--r-- | grep.c | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -1622,6 +1622,8 @@ static int chk_hit_marker(struct grep_expr *x) int grep_source(struct grep_opt *opt, struct grep_source *gs) { + if(opt->none_match) + return !grep_source_1(opt, gs, 0); /* * we do not have to do the two-pass grep when we do not check * buffer-wide "all-match". |