summaryrefslogtreecommitdiff
path: root/revision.h
diff options
context:
space:
mode:
authorChristoph Junghans <ottxor@gentoo.org>2015-01-12 18:33:32 -0700
committerJunio C Hamano <gitster@pobox.com>2015-01-13 10:20:32 -0800
commit22dfa8a23de4bbb274027736edd3bd311dda2981 (patch)
tree98607b458d72d693ed6ee33005d785c05b7b7bc6 /revision.h
parent3c84ac86fc896c108b789b8eb26b169cc0e8088a (diff)
downloadgit-22dfa8a23de4bbb274027736edd3bd311dda2981.tar.gz
log: teach --invert-grep optioncj/log-invert-grep
"git log --grep=<string>" shows only commits with messages that match the given string, but sometimes it is useful to be able to show only commits that do *not* have certain messages (e.g. "show me ones that are not FIXUP commits"). Originally, we had the invert-grep flag in grep_opt, but because "git grep --invert-grep" does not make sense except in conjunction with "--files-with-matches", which is already covered by "--files-without-matches", it was moved it to revisions structure. To have the flag there expresses the function to the feature better. When the newly inserted two tests run, the history would have commits with messages "initial", "second", "third", "fourth", "fifth", "sixth" and "Second", committed in this order. The commits that does not match either "th" or "Sec" is "second" and "initial". For the case insensitive case only "initial" matches. Signed-off-by: Christoph Junghans <ottxor@gentoo.org> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'revision.h')
-rw-r--r--revision.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/revision.h b/revision.h
index a6205307cf..b0b82e766e 100644
--- a/revision.h
+++ b/revision.h
@@ -168,6 +168,8 @@ struct rev_info {
/* Filter by commit log message */
struct grep_opt grep_filter;
+ /* Negate the match of grep_filter */
+ int invert_grep;
/* Display history graph */
struct git_graph *graph;