summaryrefslogtreecommitdiffabout
path: root/cgit.c
Side-by-side diff
Diffstat (limited to 'cgit.c') (more/less context) (ignore whitespace changes)
-rw-r--r--cgit.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/cgit.c b/cgit.c
index 6c7e811..9305d0a 100644
--- a/cgit.c
+++ b/cgit.c
@@ -62,2 +62,4 @@ void repo_config(struct cgit_repo *repo, const char *name, const char *value)
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, "max-stats"))
@@ -139,2 +141,4 @@ void config_cb(const char *name, const char *value)
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-tree-linenumbers"))
@@ -167,2 +171,4 @@ void config_cb(const char *name, const char *value)
ctx.cfg.max_repodesc_len = atoi(value);
+ else if (!strcmp(name, "max-blob-size"))
+ ctx.cfg.max_blob_size = atoi(value);
else if (!strcmp(name, "max-repo-count"))
@@ -184,2 +190,4 @@ void config_cb(const char *name, const char *value)
ctx.cfg.summary_tags = atoi(value);
+ else if (!strcmp(name, "side-by-side-diffs"))
+ ctx.cfg.ssdiff = atoi(value);
else if (!strcmp(name, "agefile"))
@@ -211,2 +219,4 @@ static void querystring_cb(const char *name, const char *value)
} else if (!strcmp(name, "url")) {
+ if (*value == '/')
+ value++;
ctx.qry.url = xstrdup(value);
@@ -240,2 +250,4 @@ static void querystring_cb(const char *name, const char *value)
ctx.qry.period = xstrdup(value);
+ } else if (!strcmp(name, "ss")) {
+ ctx.qry.ssdiff = atoi(value);
}
@@ -270,2 +282,3 @@ static void prepare_context(struct cgit_context *ctx)
ctx->cfg.max_repodesc_len = 80;
+ ctx->cfg.max_blob_size = 0;
ctx->cfg.max_stats = 0;
@@ -281,2 +294,3 @@ static void prepare_context(struct cgit_context *ctx)
ctx->cfg.summary_tags = 10;
+ ctx->cfg.ssdiff = 0;
ctx->env.cgit_config = xstrdupn(getenv("CGIT_CONFIG"));