]> git.ipfire.org Git - thirdparty/git.git/commit
use only the $PATH for exec'ing git commands
authorScott R Parish <srp@srparish.net>
Sun, 28 Oct 2007 11:17:20 +0000 (04:17 -0700)
committerJunio C Hamano <gitster@pobox.com>
Tue, 30 Oct 2007 03:51:37 +0000 (20:51 -0700)
commit511707d42b3b3e57d9623493092590546ffeae80
tree7d37f2f06ad9f66c0595526332d7f8ac19a9c67e
parent0966003c8e8d1528912b10667b903cd981e3a7f6
use only the $PATH for exec'ing git commands

We need to correctly set up $PATH for non-c based git commands.
Since we already do this, we can just use that $PATH and execvp,
instead of looping over the paths with execve.

This patch adds a setup_path() function to exec_cmd.c, which sets
the $PATH order correctly for our search order. execv_git_cmd() is
stripped down to setting up argv and calling execvp(). git.c's
main() only only needs to call setup_path().

Signed-off-by: Scott R Parish <srp@srparish.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
exec_cmd.c
exec_cmd.h
git.c