<feed xmlns='http://www.w3.org/2005/Atom'>
<title>user/sven/git.git/exec_cmd.h, branch v1.5.6.4</title>
<subtitle>Git
</subtitle>
<id>https://git.stealer.net/cgit.cgi/user/sven/git.git/atom?h=v1.5.6.4</id>
<link rel='self' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/atom?h=v1.5.6.4'/>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/'/>
<updated>2007-10-30T03:51:37Z</updated>
<entry>
<title>use only the $PATH for exec'ing git commands</title>
<updated>2007-10-30T03:51:37Z</updated>
<author>
<name>Scott R Parish</name>
<email>srp@srparish.net</email>
</author>
<published>2007-10-28T11:17:20Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=511707d42b3b3e57d9623493092590546ffeae80'/>
<id>urn:sha1:511707d42b3b3e57d9623493092590546ffeae80</id>
<content type='text'>
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 &lt;srp@srparish.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>"current_exec_path" is a misleading name, use "argv_exec_path"</title>
<updated>2007-10-30T03:51:37Z</updated>
<author>
<name>Scott R Parish</name>
<email>srp@srparish.net</email>
</author>
<published>2007-10-27T08:36:51Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=384df83312d24ea4d11adcf4e73921fc192595d2'/>
<id>urn:sha1:384df83312d24ea4d11adcf4e73921fc192595d2</id>
<content type='text'>
Signed-off-by: Scott R Parish &lt;srp@srparish.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Make macros to prevent double-inclusion in headers consistent.</title>
<updated>2007-04-29T09:05:11Z</updated>
<author>
<name>Junio C Hamano</name>
<email>junkio@cox.net</email>
</author>
<published>2007-04-29T06:38:52Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=e0173ad9fcabfcabe54d65be2c8b6602f61079e6'/>
<id>urn:sha1:e0173ad9fcabfcabe54d65be2c8b6602f61079e6</id>
<content type='text'>
Signed-off-by: Junio C Hamano &lt;junkio@cox.net&gt;
</content>
</entry>
<entry>
<title>Const tightening.</title>
<updated>2006-03-05T10:47:29Z</updated>
<author>
<name>Junio C Hamano</name>
<email>junkio@cox.net</email>
</author>
<published>2006-03-05T10:47:29Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=9201c707426b3dc0c894775416f576c25c008d46'/>
<id>urn:sha1:9201c707426b3dc0c894775416f576c25c008d46</id>
<content type='text'>
Mark Wooding noticed there was a type mismatch warning in git.c; this
patch does things slightly differently (mostly tightening const) and
was what I was holding onto, waiting for the setup-revisions change
to be merged into the master branch.

Signed-off-by: Junio C Hamano &lt;junkio@cox.net&gt;
</content>
</entry>
<entry>
<title>Exec git programs without using PATH.</title>
<updated>2006-01-14T00:49:01Z</updated>
<author>
<name>Michal Ostrowski</name>
<email>mostrows@watson.ibm.com</email>
</author>
<published>2006-01-11T02:12:17Z</published>
<link rel='alternate' type='text/html' href='https://git.stealer.net/cgit.cgi/user/sven/git.git/commit/?id=77cb17e940c806a4cc811bfd66187277b729a1e7'/>
<id>urn:sha1:77cb17e940c806a4cc811bfd66187277b729a1e7</id>
<content type='text'>
The git suite may not be in PATH (and thus programs such as
git-send-pack could not exec git-rev-list).  Thus there is a need for
logic that will locate these programs.  Modifying PATH is not
desirable as it result in behavior differing from the user's
intentions, as we may end up prepending "/usr/bin" to PATH.

- git C programs will use exec*_git_cmd() APIs to exec sub-commands.
- exec*_git_cmd() will execute a git program by searching for it in
  the following directories:
	1. --exec-path (as used by "git")
	2. The GIT_EXEC_PATH environment variable.
	3. $(gitexecdir) as set in Makefile (default value $(bindir)).
- git wrapper will modify PATH as before to enable shell scripts to
  invoke "git-foo" commands.

Ideally, shell scripts should use the git wrapper to become independent
of PATH, and then modifying PATH will not be necessary.

[jc: with minor updates after a brief review.]

Signed-off-by: Michal Ostrowski &lt;mostrows@watson.ibm.com&gt;
Signed-off-by: Junio C Hamano &lt;junkio@cox.net&gt;
</content>
</entry>
</feed>
