replace: use a GIT_NO_REPLACE_OBJECTS env variable
[gitweb.git] / environment.c
index 5de683784039f20b55f58ef36cb04a11f6a10610..5946f385f57d4be47c2ab02585a90ba8da723f1f 100644 (file)
@@ -83,6 +83,8 @@ static void setup_git_env(void)
        git_graft_file = getenv(GRAFT_ENVIRONMENT);
        if (!git_graft_file)
                git_graft_file = git_pathdup("info/grafts");
+       if (getenv(NO_REPLACE_OBJECTS_ENVIRONMENT))
+               read_replace_refs = 0;
 }
 
 int is_bare_repository(void)