]> gitweb.ps.run Git - ps-cgit/commitdiff
Merge branch 'ag/atom-fixes'
authorLars Hjemli <hjemli@gmail.com>
Sat, 19 Jun 2010 09:42:12 +0000 (11:42 +0200)
committerLars Hjemli <hjemli@gmail.com>
Sat, 19 Jun 2010 09:42:12 +0000 (11:42 +0200)
1  2 
cgit.c
cgit.h
cgitrc.5.txt

diff --combined cgit.c
index 6ccf4aaf43bf9ca1b250991a0e5a3cdeb1d95fb4,bf64c9ef5ad0fc3f501f2261d6e14034753d1c12..38bc136596ce610cfe6cb08450658ecee5e590ca
--- 1/cgit.c
--- 2/cgit.c
+++ b/cgit.c
@@@ -62,8 -62,6 +62,8 @@@ void repo_config(struct cgit_repo *repo
                repo->enable_log_linecount = ctx.cfg.enable_log_linecount * atoi(value);
        else if (!strcmp(name, "enable-remote-branches"))
                repo->enable_remote_branches = atoi(value);
 +      else if (!strcmp(name, "enable-subject-links"))
 +              repo->enable_subject_links = atoi(value);
        else if (!strcmp(name, "max-stats"))
                repo->max_stats = cgit_find_stats_period(value, NULL);
        else if (!strcmp(name, "module-link"))
@@@ -143,8 -141,6 +143,8 @@@ void config_cb(const char *name, const 
                ctx.cfg.enable_log_linecount = atoi(value);
        else if (!strcmp(name, "enable-remote-branches"))
                ctx.cfg.enable_remote_branches = atoi(value);
 +      else if (!strcmp(name, "enable-subject-links"))
 +              ctx.cfg.enable_subject_links = atoi(value);
        else if (!strcmp(name, "enable-tree-linenumbers"))
                ctx.cfg.enable_tree_linenumbers = atoi(value);
        else if (!strcmp(name, "max-stats"))
                ctx.cfg.commit_filter = new_filter(value, 0);
        else if (!strcmp(name, "embedded"))
                ctx.cfg.embedded = atoi(value);
+       else if (!strcmp(name, "max-atom-items"))
+               ctx.cfg.max_atom_items = atoi(value);
        else if (!strcmp(name, "max-message-length"))
                ctx.cfg.max_msg_len = atoi(value);
        else if (!strcmp(name, "max-repodesc-length"))
@@@ -254,6 -252,8 +256,8 @@@ static void querystring_cb(const char *
                ctx.qry.period = xstrdup(value);
        } else if (!strcmp(name, "ss")) {
                ctx.qry.ssdiff = atoi(value);
+       } else if (!strcmp(name, "all")) {
+               ctx.qry.show_all = atoi(value);
        }
  }
  
@@@ -296,6 -296,7 +300,7 @@@ static void prepare_context(struct cgit
        ctx->cfg.summary_branches = 10;
        ctx->cfg.summary_log = 10;
        ctx->cfg.summary_tags = 10;
+       ctx->cfg.max_atom_items = 10;
        ctx->cfg.ssdiff = 0;
        ctx->env.cgit_config = xstrdupn(getenv("CGIT_CONFIG"));
        ctx->env.http_host = xstrdupn(getenv("HTTP_HOST"));
diff --combined cgit.h
index 9b1e3f8ca7862857a0fa800dc6fda5becbe614c9,7fafb58aeb544be0e7d173d0240eedee9bcff67c..8884f9e500dddb7d403ed1877217d8f3600bb041
--- 1/cgit.h
--- 2/cgit.h
+++ b/cgit.h
@@@ -73,7 -73,6 +73,7 @@@ struct cgit_repo 
        int enable_log_filecount;
        int enable_log_linecount;
        int enable_remote_branches;
 +      int enable_subject_links;
        int max_stats;
        time_t mtime;
        struct cgit_filter *about_filter;
@@@ -146,6 -145,7 +146,7 @@@ struct cgit_query 
        char *sort;
        int showmsg;
        int ssdiff;
+       int show_all;
  };
  
  struct cgit_config {
        int enable_log_filecount;
        int enable_log_linecount;
        int enable_remote_branches;
 +      int enable_subject_links;
        int enable_tree_linenumbers;
        int local_time;
+       int max_atom_items;
        int max_repo_count;
        int max_commit_count;
        int max_lock_attempts;
diff --combined cgitrc.5.txt
index fcd4308d603a89c6823618531da4e76eedb5a7c3,6cdfd0323010bb49416325175c5d893f918d1cbb..5c2438103285241f25aaf37ff68ca3f923a6f6a6
@@@ -115,12 -115,6 +115,12 @@@ enable-remote-branches:
        in the summary and refs views. Default value: "0". See also:
        "repo.enable-remote-branches".
  
 +enable-subject-links::
 +      Flag which, when set to "1", will make cgit use the subject of the
 +      parent commit as link text when generating links to parent commits
 +      in commit view. Default value: "0". See also:
 +      "repo.enable-subject-links".
 +
  enable-tree-linenumbers::
        Flag which, when set to "1", will make cgit generate linenumber links
        for plaintext blobs printed in the tree view. Default value: "1".
@@@ -172,6 -166,10 +172,10 @@@ logo-link:
        calculated url of the repository index page will be used. Default
        value: none.
  
+ max-atom-items::
+       Specifies the number of items to display in atom feeds view. Default
+       value: "10".
  max-commit-count::
        Specifies the number of entries to list per page in "log" view. Default
        value: "50".
@@@ -327,10 -325,6 +331,10 @@@ repo.enable-remote-branches:
        Flag which, when set to "1", will make cgit display remote branches
        in the summary and refs views. Default value: <enable-remote-branches>.
  
 +repo.enable-subject-links::
 +      A flag which can be used to override the global setting
 +      `enable-subject-links'. Default value: none.
 +
  repo.max-stats::
        Override the default maximum statistics period. Valid values are equal
        to the values specified for the global "max-stats" setting. Default