Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
teach revision walker about --all-match.
author
Junio C Hamano
<junkio@cox.net>
Thu, 28 Sep 2006 00:55:58 +0000
(17:55 -0700)
committer
Junio C Hamano
<junkio@cox.net>
Thu, 28 Sep 2006 06:59:10 +0000
(23:59 -0700)
This lets you say:
git log --all-match --author=Linus --committer=Junio --grep=rev-list
to limit commits that was written by Linus, committed by me and
the log message contains word "rev-list".
Signed-off-by: Junio C Hamano <junkio@cox.net>
revision.c
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
0ab7bef
)
diff --git
a/revision.c
b/revision.c
index 93f25130a05ccca3e3e6c65b750f256246ae16be..f1e0caaae3d2a96de6cf9bad12e8641c19d788dd 100644
(file)
--- a/
revision.c
+++ b/
revision.c
@@
-732,6
+732,7
@@
int setup_revisions(int argc, const char **argv, struct rev_info *revs, const ch
int i, flags, seen_dashdash, show_merge;
const char **unrecognized = argv + 1;
int left = 1;
int i, flags, seen_dashdash, show_merge;
const char **unrecognized = argv + 1;
int left = 1;
+ int all_match = 0;
/* First, search for "--" */
seen_dashdash = 0;
/* First, search for "--" */
seen_dashdash = 0;
@@
-967,6
+968,10
@@
int setup_revisions(int argc, const char **argv, struct rev_info *revs, const ch
add_message_grep(revs, arg+7);
continue;
}
add_message_grep(revs, arg+7);
continue;
}
+ if (!strcmp(arg, "--all-match")) {
+ all_match = 1;
+ continue;
+ }
opts = diff_opt_parse(&revs->diffopt, argv+i, argc-i);
if (opts > 0) {
opts = diff_opt_parse(&revs->diffopt, argv+i, argc-i);
if (opts > 0) {
@@
-1028,8
+1033,10
@@
int setup_revisions(int argc, const char **argv, struct rev_info *revs, const ch
if (diff_setup_done(&revs->diffopt) < 0)
die("diff_setup_done failed");
if (diff_setup_done(&revs->diffopt) < 0)
die("diff_setup_done failed");
- if (revs->grep_filter)
+ if (revs->grep_filter) {
+ revs->grep_filter->all_match = all_match;
compile_grep_patterns(revs->grep_filter);
compile_grep_patterns(revs->grep_filter);
+ }
return left;
}
return left;
}