diff options
author | Lars Hjemli <hjemli@gmail.com> | 2009-08-09 20:22:00 (JST) |
---|---|---|
committer | Lars Hjemli <hjemli@gmail.com> | 2009-08-09 20:22:00 (JST) |
commit | e976df27952ca1e450c1c3d420532ac9f5e3036b (patch) | |
tree | 2634538f3144c935d1579315d4de289e6c890f19 /cgit.h | |
parent | f35db1cd2b75aac6952aa07713e44ca01fd89727 (diff) | |
download | cgit-e976df27952ca1e450c1c3d420532ac9f5e3036b.zip cgit-e976df27952ca1e450c1c3d420532ac9f5e3036b.tar.gz |
Add support for repo.commit-filter and repo.source-filter
These options can be used to override the default commit- and source-
filter settings per repository.
Signed-off-by: Lars Hjemli <hjemli@gmail.com>
Diffstat (limited to 'cgit.h')
-rw-r--r-- | cgit.h | 20 |
1 files changed, 11 insertions, 9 deletions
@@ -48,6 +48,15 @@ typedef void (*configfn)(const char *name, const char *value); | |||
48 | typedef void (*filepair_fn)(struct diff_filepair *pair); | 48 | typedef void (*filepair_fn)(struct diff_filepair *pair); |
49 | typedef void (*linediff_fn)(char *line, int len); | 49 | typedef void (*linediff_fn)(char *line, int len); |
50 | 50 | ||
51 | struct cgit_filter { | ||
52 | char *cmd; | ||
53 | char **argv; | ||
54 | int old_stdout; | ||
55 | int pipe_fh[2]; | ||
56 | int pid; | ||
57 | int exitstatus; | ||
58 | }; | ||
59 | |||
51 | struct cgit_repo { | 60 | struct cgit_repo { |
52 | char *url; | 61 | char *url; |
53 | char *name; | 62 | char *name; |
@@ -64,6 +73,8 @@ struct cgit_repo { | |||
64 | int enable_log_linecount; | 73 | int enable_log_linecount; |
65 | int max_stats; | 74 | int max_stats; |
66 | time_t mtime; | 75 | time_t mtime; |
76 | struct cgit_filter *commit_filter; | ||
77 | struct cgit_filter *source_filter; | ||
67 | }; | 78 | }; |
68 | 79 | ||
69 | struct cgit_repolist { | 80 | struct cgit_repolist { |
@@ -129,15 +140,6 @@ struct cgit_query { | |||
129 | int showmsg; | 140 | int showmsg; |
130 | }; | 141 | }; |
131 | 142 | ||
132 | struct cgit_filter { | ||
133 | char *cmd; | ||
134 | char **argv; | ||
135 | int old_stdout; | ||
136 | int pipe_fh[2]; | ||
137 | int pid; | ||
138 | int exitstatus; | ||
139 | }; | ||
140 | |||
141 | struct cgit_config { | 143 | struct cgit_config { |
142 | char *agefile; | 144 | char *agefile; |
143 | char *cache_root; | 145 | char *cache_root; |