aboutsummaryrefslogtreecommitdiff
path: root/sha1_file.c
diff options
context:
space:
mode:
authorSven Verdoolaege <skimo@kotnet.org>2005-09-26 22:54:01 +0200
committerJunio C Hamano <junkio@cox.net>2005-09-27 00:16:39 -0700
commit5da1606d0bf5b970fadfa0ca91618a1e871f6755 (patch)
tree559dd6786b16a653f9e2544f4b4ab627da6a6702 /sha1_file.c
parentedde7a8b5324d88f07fcb8204da313c19b4988fa (diff)
downloadgit-5da1606d0bf5b970fadfa0ca91618a1e871f6755.tar.gz
git-5da1606d0bf5b970fadfa0ca91618a1e871f6755.tar.xz
[PATCH] Provide access to git_dir through get_git_dir().
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org> Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'sha1_file.c')
-rw-r--r--sha1_file.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/sha1_file.c b/sha1_file.c
index 663820278..fe374c613 100644
--- a/sha1_file.c
+++ b/sha1_file.c
@@ -70,6 +70,13 @@ static void setup_git_env(void)
git_graft_file = strdup(git_path("info/grafts"));
}
+char *get_git_dir(void)
+{
+ if (!git_dir)
+ setup_git_env();
+ return git_dir;
+}
+
char *get_object_directory(void)
{
if (!git_object_dir)