mirror of
https://git.zx2c4.com/cgit
synced 2024-11-27 10:56:21 +00:00
Set GIT_NAMESPACE when repo.namespace is provided
This causes any namespace-aware code to only handle refs under that namespace. Currently this doesn't do much as the only namespace aware code is in recieve-pack and upload-pack, which are not handled by CGit. Signed-off-by: Richard Maw <richard.maw@gmail.com>
This commit is contained in:
parent
2163777623
commit
a76460c5ed
5
cgit.c
5
cgit.c
@ -566,6 +566,11 @@ static int prepare_repo_cmd(void)
|
|||||||
/* The path to the git repository. */
|
/* The path to the git repository. */
|
||||||
setenv("GIT_DIR", ctx.repo->path, 1);
|
setenv("GIT_DIR", ctx.repo->path, 1);
|
||||||
|
|
||||||
|
/* Set the namespace in the environment,
|
||||||
|
* so it gets loaded on the first get_git_namespace() */
|
||||||
|
if (ctx.repo->namespace)
|
||||||
|
setenv("GIT_NAMESPACE", ctx.repo->namespace, 1);
|
||||||
|
|
||||||
/* Do not look in /etc/ for gitconfig and gitattributes. */
|
/* Do not look in /etc/ for gitconfig and gitattributes. */
|
||||||
setenv("GIT_CONFIG_NOSYSTEM", "1", 1);
|
setenv("GIT_CONFIG_NOSYSTEM", "1", 1);
|
||||||
setenv("GIT_ATTR_NOSYSTEM", "1", 1);
|
setenv("GIT_ATTR_NOSYSTEM", "1", 1);
|
||||||
|
Loading…
Reference in New Issue
Block a user