summaryrefslogtreecommitdiff
path: root/exec_cmd.c
diff options
context:
space:
mode:
authorChris Webb <chris@arachsys.com>2010-04-13 10:07:13 +0100
committerJunio C Hamano <gitster@pobox.com>2010-04-15 12:07:51 -0700
commitcb6a22c0760f30ff8050b508b9fabbe13ffba1ae (patch)
tree2a95e24b0a003dde2de39cbf70fcb22a1b4a9395 /exec_cmd.c
parentadda3c3beb0a244719becb1895e16227b0393bd1 (diff)
downloadgit-cb6a22c0760f30ff8050b508b9fabbe13ffba1ae.tar.gz
exec_cmd.c: replace hard-coded path list with one from <paths.h>
The default executable path list used by exec_cmd.c is hard-coded to be "/usr/local/bin:/usr/bin:/bin". Use an appropriate value for the system from <paths.h> when available. Add HAVE_PATHS_H make variables and enable it on Linux, FreeBSD, NetBSD, OpenBSD and GNU where it is known to exist for now. Somebody else may want to do an autoconf support later. Signed-off-by: Chris Webb <chris@arachsys.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'exec_cmd.c')
-rw-r--r--exec_cmd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/exec_cmd.c b/exec_cmd.c
index 408e4e55e1..484d018e19 100644
--- a/exec_cmd.c
+++ b/exec_cmd.c
@@ -107,7 +107,7 @@ void setup_path(void)
if (old_path)
strbuf_addstr(&new_path, old_path);
else
- strbuf_addstr(&new_path, "/usr/local/bin:/usr/bin:/bin");
+ strbuf_addstr(&new_path, _PATH_DEFPATH);
setenv("PATH", new_path.buf, 1);