aboutsummaryrefslogtreecommitdiffstats
path: root/shared.c
diff options
context:
space:
mode:
Diffstat (limited to 'shared.c')
-rw-r--r--shared.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/shared.c b/shared.c
index 84aa281..bf0581f 100644
--- a/shared.c
+++ b/shared.c
@@ -26,6 +26,8 @@ char *cgit_virtual_root = NULL;
26char *cgit_script_name = CGIT_SCRIPT_NAME; 26char *cgit_script_name = CGIT_SCRIPT_NAME;
27char *cgit_cache_root = CGIT_CACHE_ROOT; 27char *cgit_cache_root = CGIT_CACHE_ROOT;
28char *cgit_repo_group = NULL; 28char *cgit_repo_group = NULL;
29char *cgit_robots = "index, nofollow";
30char *cgit_clone_prefix = NULL;
29 31
30int cgit_nocache = 0; 32int cgit_nocache = 0;
31int cgit_snapshots = 0; 33int cgit_snapshots = 0;
@@ -68,7 +70,7 @@ int htmlfd = 0;
68int cgit_get_cmd_index(const char *cmd) 70int cgit_get_cmd_index(const char *cmd)
69{ 71{
70 static char *cmds[] = {"log", "commit", "diff", "tree", "blob", 72 static char *cmds[] = {"log", "commit", "diff", "tree", "blob",
71 "snapshot", "tag", "refs", NULL}; 73 "snapshot", "tag", "refs", "patch", NULL};
72 int i; 74 int i;
73 75
74 for(i = 0; cmds[i]; i++) 76 for(i = 0; cmds[i]; i++)
@@ -197,6 +199,10 @@ void cgit_global_config_cb(const char *name, const char *value)
197 cgit_agefile = xstrdup(value); 199 cgit_agefile = xstrdup(value);
198 else if (!strcmp(name, "renamelimit")) 200 else if (!strcmp(name, "renamelimit"))
199 cgit_renamelimit = atoi(value); 201 cgit_renamelimit = atoi(value);
202 else if (!strcmp(name, "robots"))
203 cgit_robots = xstrdup(value);
204 else if (!strcmp(name, "clone-prefix"))
205 cgit_clone_prefix = xstrdup(value);
200 else if (!strcmp(name, "repo.group")) 206 else if (!strcmp(name, "repo.group"))
201 cgit_repo_group = xstrdup(value); 207 cgit_repo_group = xstrdup(value);
202 else if (!strcmp(name, "repo.url")) 208 else if (!strcmp(name, "repo.url"))
@@ -205,6 +211,8 @@ void cgit_global_config_cb(const char *name, const char *value)
205 cgit_repo->name = xstrdup(value); 211 cgit_repo->name = xstrdup(value);
206 else if (cgit_repo && !strcmp(name, "repo.path")) 212 else if (cgit_repo && !strcmp(name, "repo.path"))
207 cgit_repo->path = trim_end(value, '/'); 213 cgit_repo->path = trim_end(value, '/');
214 else if (cgit_repo && !strcmp(name, "repo.clone-url"))
215 cgit_repo->clone_url = xstrdup(value);
208 else if (cgit_repo && !strcmp(name, "repo.desc")) 216 else if (cgit_repo && !strcmp(name, "repo.desc"))
209 cgit_repo->desc = xstrdup(value); 217 cgit_repo->desc = xstrdup(value);
210 else if (cgit_repo && !strcmp(name, "repo.owner")) 218 else if (cgit_repo && !strcmp(name, "repo.owner"))
@@ -267,6 +275,8 @@ void *cgit_free_commitinfo(struct commitinfo *info)
267 free(info->committer); 275 free(info->committer);
268 free(info->committer_email); 276 free(info->committer_email);
269 free(info->subject); 277 free(info->subject);
278 free(info->msg);
279 free(info->msg_encoding);
270 free(info); 280 free(info);
271 return NULL; 281 return NULL;
272} 282}