From: Matthias Lederhofer <matled@gmx.net>
To: git@vger.kernel.org
Subject: [PATCH] export setup_git_env()
Date: Wed, 4 Apr 2007 22:09:48 +0200 [thread overview]
Message-ID: <20070404200948.GA22782@moooo.ath.cx> (raw)
In-Reply-To: <20070328141505.GA16600@moooo.ath.cx>
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 <matled@gmx.net>
---
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
next prev parent reply other threads:[~2007-04-04 20:09 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-28 14:15 [PATCH/RFC] introduce GIT_WORK_TREE environment variable Matthias Lederhofer
2007-03-28 15:45 ` Johannes Sixt
2007-03-29 8:22 ` Matthias Lederhofer
2007-04-04 14:08 ` Matthias Lederhofer
2007-04-04 16:59 ` Dana How
2007-04-04 18:45 ` Junio C Hamano
2007-04-04 21:04 ` Matthias Lederhofer
2007-04-04 20:09 ` Matthias Lederhofer [this message]
2007-04-04 20:13 ` [PATCH(amend)] " Matthias Lederhofer
2007-04-04 22:34 ` Junio C Hamano
2007-04-06 13:21 ` Matthias Lederhofer
2007-04-11 1:29 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070404200948.GA22782@moooo.ath.cx \
--to=matled@gmx.net \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).