diff options
author | Richard Maw <richard.maw@gmail.com> | 2016-06-25 19:38:41 +0000 |
---|---|---|
committer | Richard Maw <richard.maw@gmail.com> | 2016-07-13 19:09:37 +0000 |
commit | 7a76691acf749e53c9d8d3ddaa558259d5567d34 (patch) | |
tree | 5b1b94b4ee5fee8693f7882c9e9a48c713e65a2b | |
parent | b2ac89127af9dde5c3addbd3e00eedd9f498cfab (diff) | |
download | cgit-7a76691acf749e53c9d8d3ddaa558259d5567d34.tar cgit-7a76691acf749e53c9d8d3ddaa558259d5567d34.tar.gz cgit-7a76691acf749e53c9d8d3ddaa558259d5567d34.zip |
Parse repo.namespace
This contains the unexpanded name of the namespace
rather than the base ref of the namespace,
since the git namespace mechanism works by setting GIT_NAMESPACE
and on the first call to get_git_namespace() it gets expanded.
We need to save this for a later call to prepare_repo_cmd,
rather than trying to process it here,
since we can only do it once,
and we have other uses for the unexpanded name.
Signed-off-by: Richard Maw <richard.maw@gmail.com>
-rw-r--r-- | cgit.c | 2 | ||||
-rw-r--r-- | cgit.h | 1 |
2 files changed, 3 insertions, 0 deletions
@@ -45,6 +45,8 @@ static void repo_config(struct cgit_repo *repo, const char *name, const char *va repo->homepage = xstrdup(value); else if (!strcmp(name, "defbranch")) repo->defbranch = xstrdup(value); + else if (!strcmp(name, "namespace")) + repo->namespace = xstrdup(value); else if (!strcmp(name, "snapshots")) repo->snapshots = ctx.cfg.snapshots & cgit_parse_snapshots_mask(value); else if (!strcmp(name, "enable-commit-graph")) @@ -87,6 +87,7 @@ struct cgit_repo { struct string_list readme; char *section; char *clone_url; + char *namespace; char *logo; char *logo_link; int snapshots; |