summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 83b5d2f)
raw | patch | inline | side by side (parent: 83b5d2f)
author | Junio C Hamano <junkio@cox.net> | |
Sun, 17 Sep 2006 22:43:40 +0000 (15:43 -0700) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Wed, 20 Sep 2006 18:14:39 +0000 (11:14 -0700) |
This is from a suggestion by Linus, just to mark the locations where we
need to modify to actually implement the filtering.
We do not have any actual filtering code yet.
Signed-off-by: Junio C Hamano <junkio@cox.net>
need to modify to actually implement the filtering.
We do not have any actual filtering code yet.
Signed-off-by: Junio C Hamano <junkio@cox.net>
revision.c | patch | blob | history | |
revision.h | patch | blob | history |
diff --git a/revision.c b/revision.c
index 6a2539b623512917479be3e6601ee8b8bef4953d..a14457a12988cfe05c77096a72d25922d1d30395 100644 (file)
--- a/revision.c
+++ b/revision.c
#include "diff.h"
#include "refs.h"
#include "revision.h"
+#include <regex.h>
+#include "grep.h"
static char *path_name(struct name_path *path, const char *name)
{
}
}
+static int commit_match(struct commit *commit, struct rev_info *opt)
+{
+ if (!opt->header_filter && !opt->message_filter)
+ return 1;
+
+ /* match it here */
+ return 1;
+}
+
struct commit *get_revision(struct rev_info *revs)
{
struct commit_list *list = revs->commits;
if (revs->no_merges &&
commit->parents && commit->parents->next)
continue;
+ if (!commit_match(commit, revs))
+ continue;
if (revs->prune_fn && revs->dense) {
/* Commit without changes? */
if (!(commit->object.flags & TREECHANGE)) {
diff --git a/revision.h b/revision.h
index a5c35d05cbd6bceb12248dff0b1e5c3f3433aeae..60030e53f4214a3082b05108eee86f207fff1eaa 100644 (file)
--- a/revision.h
+++ b/revision.h
const char *add_signoff;
const char *extra_headers;
+ /* Filter by commit log message */
+ struct grep_opt *header_filter;
+ struct grep_opt *message_filter;
+
/* special limits */
int max_count;
unsigned long max_age;