After changing environment variables used by environment.c
we need to call getenv() again. setup_git_env() does this
and can now be used from other files too.
Signed-off-by: Matthias Lederhofer <redacted>
---
cache.h | 1 +
environment.c | 2 +-
2 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/cache.h b/cache.h
index 384b260..7b49258 100644
--- a/cache.h
+++ b/cache.h
@@ -154,6 +154,7 @@ enum object_type {
#define EXEC_PATH_ENVIRONMENT "GIT_EXEC_PATH"
extern int is_bare_repository_cfg;
+extern void setup_git_env(void);
extern int is_bare_repository(void);
extern int is_inside_git_dir(void);
extern const char *get_git_dir(void);diff --git a/environment.c b/environment.c
index 2231659..713a011 100644
--- a/environment.c
+++ b/environment.c
@@ -35,7 +35,7 @@ int auto_crlf = 0; /* 1: both ways, -1: only when adding git objects */
static const char *git_dir;
static char *git_object_dir, *git_index_file, *git_refs_dir, *git_graft_file;
-static void setup_git_env(void)
+void setup_git_env(void)
{
git_dir = getenv(GIT_DIR_ENVIRONMENT);
if (!git_dir)--
1.5.1.4.g446af-dirty