Signed-off-by: Nguyễn Thái Ngọc Duy <pclo...@gmail.com>
---
 environment.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/environment.c b/environment.c
index d5ae7a3..cbfa879 100644
--- a/environment.c
+++ b/environment.c
@@ -125,13 +125,17 @@ static char *expand_namespace(const char *raw_namespace)
 static void setup_git_env(void)
 {
        const char *gitfile;
+       char *super;
 
        git_dir = getenv(GIT_DIR_ENVIRONMENT);
        if (!git_dir)
                git_dir = DEFAULT_GIT_DIR_ENVIRONMENT;
-       gitfile = read_gitfile(git_dir);
+       gitfile = read_gitfile_super(git_dir, &super);
        git_dir = xstrdup(gitfile ? gitfile : git_dir);
-       git_super_dir = getenv(GIT_SUPER_DIR_ENVIRONMENT);
+       if (super)
+               git_super_dir = xstrdup(super);
+       else
+               git_super_dir = getenv(GIT_SUPER_DIR_ENVIRONMENT);
        git_object_dir = getenv(DB_ENVIRONMENT);
        if (!git_object_dir) {
                git_object_dir = xmalloc(strlen(git_dir) + 9);
-- 
1.8.5.1.77.g42c48fa

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to