diff options
| author | Philip Oakley <philipoakley@iee.org> | 2018-04-21 13:18:42 +0200 |
|---|---|---|
| committer | Junio C Hamano <gitster@pobox.com> | 2018-04-24 11:12:32 +0900 |
| commit | 4d5b4c247597a5891beb84d933b8eecb77c76186 (patch) | |
| tree | dfdd504a0323222304bfe8fc9064438c466103df /exec_cmd.c | |
| parent | 0210231b0803f881bf765bb2d7284c119c6ce9b6 (diff) | |
| download | git-4d5b4c247597a5891beb84d933b8eecb77c76186.tar.xz | |
Avoid multiple PREFIX definitions
The short and sweet PREFIX can be confused when used in many places.
Rename both usages to better describe their purpose. EXEC_CMD_PREFIX is
used in full to disambiguate it from the nearby GIT_EXEC_PATH.
The PREFIX in sideband.c, while nominally independant of the exec_cmd
PREFIX, does reside within libgit[1], so the definitions would clash
when taken together with a PREFIX given on the command line for use by
exec_cmd.c.
Noticed when compiling Git for Windows using MSVC/Visual Studio [1] which
reports the conflict beteeen the command line definition and the
definition in sideband.c within the libgit project.
[1] the libgit functions are brought into a single sub-project
within the Visual Studio construction script provided in contrib,
and hence uses a single command for both exec_cmd.c and sideband.c.
Signed-off-by: Philip Oakley <philipoakley@iee.org>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'exec_cmd.c')
| -rw-r--r-- | exec_cmd.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/exec_cmd.c b/exec_cmd.c index 6e114f8b3a..ff5a297591 100644 --- a/exec_cmd.c +++ b/exec_cmd.c @@ -48,7 +48,7 @@ static const char *system_prefix(void) !(prefix = strip_path_suffix(executable_dirname, GIT_EXEC_PATH)) && !(prefix = strip_path_suffix(executable_dirname, BINDIR)) && !(prefix = strip_path_suffix(executable_dirname, "git"))) { - prefix = PREFIX; + prefix = FALLBACK_RUNTIME_PREFIX; trace_printf("RUNTIME_PREFIX requested, " "but prefix computation failed. " "Using static fallback '%s'.\n", prefix); @@ -243,7 +243,7 @@ void git_resolve_executable_dir(const char *argv0) */ static const char *system_prefix(void) { - return PREFIX; + return FALLBACK_RUNTIME_PREFIX; } /* |
