summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: fc2ded5)
raw | patch | inline | side by side (parent: fc2ded5)
author | Johannes Sixt <johannes.sixt@telecom.at> | |
Wed, 11 Apr 2007 13:26:08 +0000 (15:26 +0200) | ||
committer | Johannes Sixt <johannes.sixt@telecom.at> | |
Thu, 26 Jun 2008 06:45:12 +0000 (08:45 +0200) |
builtin_exec_path returns the hard-coded installation path, which is used
as the ultimate fallback to look for git commands. Making it into a function
enables us in a follow-up patch to return a computed value instead of just
a constant string.
Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
as the ultimate fallback to look for git commands. Making it into a function
enables us in a follow-up patch to return a computed value instead of just
a constant string.
Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
exec_cmd.c | patch | blob | history |
diff --git a/exec_cmd.c b/exec_cmd.c
index a1bc4e04bf055709bf6fab3133e0a1832c56adee..6618aad7abde8b0e74186ce7742acf0e22925479 100644 (file)
--- a/exec_cmd.c
+++ b/exec_cmd.c
#define MAX_ARGS 32
extern char **environ;
-static const char *builtin_exec_path = GIT_EXEC_PATH;
static const char *argv_exec_path;
+static const char *builtin_exec_path(void)
+{
+ return GIT_EXEC_PATH;
+}
+
void git_set_argv_exec_path(const char *exec_path)
{
argv_exec_path = exec_path;
return env;
}
- return builtin_exec_path;
+ return builtin_exec_path();
}
static void add_path(struct strbuf *out, const char *path)
add_path(&new_path, argv_exec_path);
add_path(&new_path, getenv(EXEC_PATH_ENVIRONMENT));
- add_path(&new_path, builtin_exec_path);
+ add_path(&new_path, builtin_exec_path());
add_path(&new_path, cmd_path);
if (old_path)