summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 60b7f38)
raw | patch | inline | side by side (parent: 60b7f38)
author | Pierre Habouzit <madcoder@debian.org> | |
Wed, 23 Aug 2006 10:39:11 +0000 (12:39 +0200) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Thu, 24 Aug 2006 01:47:38 +0000 (18:47 -0700) |
Signed-off-by: Pierre Habouzit <madcoder@debian.org>
Signed-off-by: Junio C Hamano <junkio@cox.net>
Signed-off-by: Junio C Hamano <junkio@cox.net>
cache.h | patch | blob | history | |
environment.c | patch | blob | history |
index 08d6a91279c87ad1e4d7ce1be1ac927b52a6113e..30447944686e55eeadcfd7ac96ce88e93309d0c0 100644 (file)
--- a/cache.h
+++ b/cache.h
#define INDEX_ENVIRONMENT "GIT_INDEX_FILE"
#define GRAFT_ENVIRONMENT "GIT_GRAFT_FILE"
-extern char *get_git_dir(void);
+extern const char *get_git_dir(void);
extern char *get_object_directory(void);
extern char *get_refs_directory(void);
extern char *get_index_file(void);
diff --git a/environment.c b/environment.c
index e6bd0033b4666f52dc756b6e2b0d5a1745b0c6b9..5fae9ac3056dd00beba3b9a13be99f7bb39d584e 100644 (file)
--- a/environment.c
+++ b/environment.c
int pager_in_use;
int pager_use_color = 1;
-static char *git_dir, *git_object_dir, *git_index_file, *git_refs_dir,
- *git_graft_file;
+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)
{
git_dir = getenv(GIT_DIR_ENVIRONMENT);
git_graft_file = strdup(git_path("info/grafts"));
}
-char *get_git_dir(void)
+const char *get_git_dir(void)
{
if (!git_dir)
setup_git_env();