rebase -i: rewrite setup_reflog_action() in C
[gitweb.git] / environment.c
index 2a6de2330bc024d19ab0c1d8cc594f146ca6da11..013e845235ea88e977c3181258b3e77e6ecb4c2f 100644 (file)
@@ -192,7 +192,7 @@ void setup_git_env(const char *git_dir)
        git_namespace = expand_namespace(getenv(GIT_NAMESPACE_ENVIRONMENT));
        shallow_file = getenv(GIT_SHALLOW_FILE_ENVIRONMENT);
        if (shallow_file)
-               set_alternate_shallow_file(shallow_file, 0);
+               set_alternate_shallow_file(the_repository, shallow_file, 0);
 }
 
 int is_bare_repository(void)
@@ -319,11 +319,11 @@ char *get_index_file(void)
        return the_repository->index_file;
 }
 
-char *get_graft_file(void)
+char *get_graft_file(struct repository *r)
 {
-       if (!the_repository->graft_file)
+       if (!r->graft_file)
                BUG("git environment hasn't been setup");
-       return the_repository->graft_file;
+       return r->graft_file;
 }
 
 static void set_git_dir_1(const char *path)