summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: c6fabfa)
raw | patch | inline | side by side (parent: c6fabfa)
author | Jakub Narebski <jnareb@gmail.com> | |
Tue, 26 Feb 2008 12:22:05 +0000 (13:22 +0100) | ||
committer | Junio C Hamano <gitster@pobox.com> | |
Wed, 27 Feb 2008 07:59:49 +0000 (23:59 -0800) |
Add support for -F | --fixed-strings option to "git log --grep"
and friends: "git log --author", "git log --committer=<pattern>".
Code is based on implementation of this option in "git grep".
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
and friends: "git log --author", "git log --committer=<pattern>".
Code is based on implementation of this option in "git grep".
Signed-off-by: Jakub Narebski <jnareb@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Documentation/git-rev-list.txt | patch | blob | history | |
Documentation/rev-list-options.txt | patch | blob | history | |
revision.c | patch | blob | history |
index 5b96eabfce9eecbfccaff16096c616105a040c3d..a8d489f9f29034d732a67375b617f3315109aa05 100644 (file)
[ \--(author|committer|grep)=<pattern> ]
[ \--regexp-ignore-case | \-i ]
[ \--extended-regexp | \-E ]
+ [ \--fixed-strings | \-F ]
[ \--date={local|relative|default|iso|rfc|short} ]
[ [\--objects | \--objects-edge] [ \--unpacked ] ]
[ \--pretty | \--header ]
index a8138e27a1a10fb0c93608af149ef22323ba9dc5..259072c07883cf15db4162737a63a6506b7443b4 100644 (file)
Consider the limiting patterns to be extended regular expressions
instead of the default basic regular expressions.
+-F, --fixed-strings::
+
+ Consider the limiting patterns to be fixed strings (don't interpret
+ pattern as a regular expression).
+
--remove-empty::
Stop when a given path disappears from the tree.
diff --git a/revision.c b/revision.c
index d3e8658104b63886bbade78366466eb4828efc28..5df7961c501488a5393fd65de5de4bcf2eac1c25 100644 (file)
--- a/revision.c
+++ b/revision.c
@@ -942,6 +942,7 @@ int setup_revisions(int argc, const char **argv, struct rev_info *revs, const ch
int left = 1;
int all_match = 0;
int regflags = 0;
+ int fixed = 0;
/* First, search for "--" */
seen_dashdash = 0;
@@ -1238,6 +1239,11 @@ int setup_revisions(int argc, const char **argv, struct rev_info *revs, const ch
regflags |= REG_ICASE;
continue;
}
+ if (!strcmp(arg, "--fixed-strings") ||
+ !strcmp(arg, "-F")) {
+ fixed = 1;
+ continue;
+ }
if (!strcmp(arg, "--all-match")) {
all_match = 1;
continue;
@@ -1293,8 +1299,10 @@ int setup_revisions(int argc, const char **argv, struct rev_info *revs, const ch
}
}
- if (revs->grep_filter)
+ if (revs->grep_filter) {
revs->grep_filter->regflags |= regflags;
+ revs->grep_filter->fixed = fixed;
+ }
if (show_merge)
prepare_show_merge(revs);