]> granicus.if.org Git - cgit/commitdiff
Merge branch 'lh/plugins'
authorLars Hjemli <hjemli@gmail.com>
Sun, 9 Aug 2009 11:46:01 +0000 (13:46 +0200)
committerLars Hjemli <hjemli@gmail.com>
Sun, 9 Aug 2009 11:46:01 +0000 (13:46 +0200)
Conflicts:
cgit.c
cgit.h

1  2 
cgit.c
cgit.h
cgitrc.5.txt
ui-commit.c
ui-tree.c

diff --cc cgit.c
index aa1107ae2100f0c13b47f18085f38542bfb3c570,b3a98c1599ff8971d9af03a0ca8ea1a1b6d8abb0..dbec1962763145d3c88f89b3ba947dd9ca11bbd5
--- 1/cgit.c
--- 2/cgit.c
+++ b/cgit.c
  
  const char *cgit_version = CGIT_VERSION;
  
 +void add_mimetype(const char *name, const char *value)
 +{
 +      struct string_list_item *item;
 +
 +      item = string_list_insert(xstrdup(name), &ctx.cfg.mimetypes);
 +      item->util = xstrdup(value);
 +}
 +
+ struct cgit_filter *new_filter(const char *cmd, int extra_args)
+ {
+       struct cgit_filter *f;
+       if (!cmd || !cmd[0])
+               return NULL;
+       f = xmalloc(sizeof(struct cgit_filter));
+       f->cmd = xstrdup(cmd);
+       f->argv = xmalloc((2 + extra_args) * sizeof(char *));
+       f->argv[0] = f->cmd;
+       f->argv[1] = NULL;
+       return f;
+ }
  void config_cb(const char *name, const char *value)
  {
        if (!strcmp(name, "root-title"))
diff --cc cgit.h
index 1194eb0209880289729ac3a196d6037ea7427561,f10ba054bc1a7b0d0e728e10983490347a9d9713..b8557ace3912b4b62c59eb709fc37dea2f1f506c
--- 1/cgit.h
--- 2/cgit.h
+++ b/cgit.h
@@@ -176,7 -185,8 +187,9 @@@ struct cgit_config 
        int summary_branches;
        int summary_log;
        int summary_tags;
 +      struct string_list mimetypes;
+       struct cgit_filter *commit_filter;
+       struct cgit_filter *source_filter;
  };
  
  struct cgit_page {
diff --cc cgitrc.5.txt
Simple merge
diff --cc ui-commit.c
Simple merge
diff --cc ui-tree.c
Simple merge