diff options
author | Dan Jacques <dnj@google.com> | 2018-03-25 16:51:20 -0400 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2018-03-25 22:28:57 -0700 |
commit | 0d037507b5969fd72535df0cae4ba33dc17b866d (patch) | |
tree | 8813f883c6b7d6b7809e7d73adc680d84e80f065 /exec_cmd.h | |
parent | deb74577943539b6f151fef130d84ccc37d59a35 (diff) | |
download | git-dj/runtime-prefix.tar.gz |
exec_cmd: RUNTIME_PREFIX on some POSIX systemsdj/runtime-prefix
Enable Git to resolve its own binary location using a variety of
OS-specific and generic methods, including:
- procfs via "/proc/self/exe" (Linux)
- _NSGetExecutablePath (Darwin)
- KERN_PROC_PATHNAME sysctl on BSDs.
- argv0, if absolute (all, including Windows).
This is used to enable RUNTIME_PREFIX support for non-Windows systems,
notably Linux and Darwin. When configured with RUNTIME_PREFIX, Git will
do a best-effort resolution of its executable path and automatically use
this as its "exec_path" for relative helper and data lookups, unless
explicitly overridden.
Small incidental formatting cleanup of "exec_cmd.c".
Signed-off-by: Dan Jacques <dnj@google.com>
Thanks-to: Robbie Iannucci <iannucci@google.com>
Thanks-to: Junio C Hamano <gitster@pobox.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'exec_cmd.h')
-rw-r--r-- | exec_cmd.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/exec_cmd.h b/exec_cmd.h index ff0b48048a..2522453cda 100644 --- a/exec_cmd.h +++ b/exec_cmd.h @@ -3,8 +3,8 @@ struct argv_array; -extern void git_set_argv_exec_path(const char *exec_path); -extern void git_extract_argv0_path(const char *path); +extern void git_set_exec_path(const char *exec_path); +extern void git_resolve_executable_dir(const char *path); extern const char *git_exec_path(void); extern void setup_path(void); extern const char **prepare_git_cmd(struct argv_array *out, const char **argv); |