<feed xmlns='http://www.w3.org/2005/Atom'>
<title>git/exec_cmd.c, branch v2.2.3</title>
<subtitle>Fork of git SCM with my patches.</subtitle>
<id>http://git.kilabit.info/git/atom?h=v2.2.3</id>
<link rel='self' href='http://git.kilabit.info/git/atom?h=v2.2.3'/>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/'/>
<updated>2014-08-26T18:06:06Z</updated>
<entry>
<title>use strbuf_add_absolute_path() to add absolute paths</title>
<updated>2014-08-26T18:06:06Z</updated>
<author>
<name>René Scharfe</name>
<email>l.s.r@web.de</email>
</author>
<published>2014-07-28T18:34:42Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=9610decf4dc6b9352b81c67e3b03e5bb47fc8427'/>
<id>urn:sha1:9610decf4dc6b9352b81c67e3b03e5bb47fc8427</id>
<content type='text'>
Signed-off-by: Rene Scharfe &lt;l.s.r@web.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>run-command: treat inaccessible directories as ENOENT</title>
<updated>2012-04-05T23:24:13Z</updated>
<author>
<name>Jeff King</name>
<email>peff@peff.net</email>
</author>
<published>2012-03-30T07:52:18Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=38f865c27d1f2560afb48efd2b7b105c1278c4b5'/>
<id>urn:sha1:38f865c27d1f2560afb48efd2b7b105c1278c4b5</id>
<content type='text'>
When execvp reports EACCES, it can be one of two things:

  1. We found a file to execute, but did not have
     permissions to do so.

  2. We did not have permissions to look in some directory
     in the $PATH.

In the former case, we want to consider this a
permissions problem and report it to the user as such (since
getting this for something like "git foo" is likely a
configuration error).

In the latter case, there is a good chance that the
inaccessible directory does not contain anything of
interest. Reporting "permission denied" is confusing to the
user (and prevents our usual "did you mean...?" lookup). It
also prevents git from trying alias lookup, since we do so
only when an external command does not exist (not when it
exists but has an error).

This patch detects EACCES from execvp, checks whether we are
in case (2), and if so converts errno to ENOENT. This
behavior matches that of "bash" (but not of simpler shells
that use execvp more directly, like "dash").

Test stolen from Junio.

Signed-off-by: Jeff King &lt;peff@peff.net&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Name make_*_path functions more accurately</title>
<updated>2011-03-17T23:08:30Z</updated>
<author>
<name>Carlos Martín Nieto</name>
<email>cmn@elego.de</email>
</author>
<published>2011-03-17T11:26:46Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=e2a57aac8a8a2b786739a5a93ea9dcfd2f0fd0e2'/>
<id>urn:sha1:e2a57aac8a8a2b786739a5a93ea9dcfd2f0fd0e2</id>
<content type='text'>
Rename the make_*_path functions so it's clearer what they do, in
particlar make clear what the differnce between make_absolute_path and
make_nonrelative_path is by renaming them real_path and absolute_path
respectively. make_relative_path has an understandable name and is
renamed to relative_path to maintain the name convention.

The function calls have been replaced 1-to-1 in their usage.

Signed-off-by: Carlos Martín Nieto &lt;cmn@elego.de&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>exec_cmd: remove unused extern</title>
<updated>2011-01-19T16:27:22Z</updated>
<author>
<name>Erik Faye-Lund</name>
<email>kusmabite@gmail.com</email>
</author>
<published>2011-01-10T22:00:49Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=b312b4123b053898a583aa6e8da1b26ea828105a'/>
<id>urn:sha1:b312b4123b053898a583aa6e8da1b26ea828105a</id>
<content type='text'>
This definition was added by commit 77cb17e9, but it's left unused since
commit 511707d. Remove the left-over definition.

Signed-off-by: Erik Faye-Lund &lt;kusmabite@gmail.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'cw/maint-exec-defpath'</title>
<updated>2010-05-21T11:02:17Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2010-05-21T11:02:17Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=455bda993cceb42921c9ff173da26651f1d66602'/>
<id>urn:sha1:455bda993cceb42921c9ff173da26651f1d66602</id>
<content type='text'>
* cw/maint-exec-defpath:
  autoconf: Check if &lt;paths.h&gt; exists and set HAVE_PATHS_H
  exec_cmd.c: replace hard-coded path list with one from &lt;paths.h&gt;
</content>
</entry>
<entry>
<title>exec_cmd.c: replace hard-coded path list with one from &lt;paths.h&gt;</title>
<updated>2010-04-15T19:07:51Z</updated>
<author>
<name>Chris Webb</name>
<email>chris@arachsys.com</email>
</author>
<published>2010-04-13T09:07:13Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=cb6a22c0760f30ff8050b508b9fabbe13ffba1ae'/>
<id>urn:sha1:cb6a22c0760f30ff8050b508b9fabbe13ffba1ae</id>
<content type='text'>
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 &lt;paths.h&gt; 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 &lt;chris@arachsys.com&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Print RUNTIME_PREFIX warning only when GIT_TRACE is set</title>
<updated>2010-02-23T21:20:15Z</updated>
<author>
<name>Johannes Sixt</name>
<email>j6t@kdbg.org</email>
</author>
<published>2010-02-23T11:42:56Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=aa0945701e39cf099ca9c28f79e239359781e4f6'/>
<id>urn:sha1:aa0945701e39cf099ca9c28f79e239359781e4f6</id>
<content type='text'>
When RUNTIME_PREFIX is enabled, the installation prefix is derived by
trying a limited set of known locations where the git executable can
reside. If none of these is found, a warning is emitted.

When git is built in a directory that matches neither of these known names,
the warning would always be emitted when the uninstalled executable is run.
This is a problem on Windows, where gitk picks the uninstalled git when
invoked from the build directory and gets confused by the warning.

Print the warning only when GIT_TRACE is set.

Signed-off-by: Johannes Sixt &lt;j6t@kdbg.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>Merge branch 'js/maint-1.6.0-exec-path-env'</title>
<updated>2009-03-26T07:27:03Z</updated>
<author>
<name>Junio C Hamano</name>
<email>gitster@pobox.com</email>
</author>
<published>2009-03-26T07:27:03Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=b2aa958dc29eb836a831138f6d84ad7cfadf4355'/>
<id>urn:sha1:b2aa958dc29eb836a831138f6d84ad7cfadf4355</id>
<content type='text'>
* js/maint-1.6.0-exec-path-env:
  Propagate --exec-path setting to external commands via GIT_EXEC_PATH
</content>
</entry>
<entry>
<title>Propagate --exec-path setting to external commands via GIT_EXEC_PATH</title>
<updated>2009-03-22T04:45:14Z</updated>
<author>
<name>Johannes Sixt</name>
<email>j6t@kdbg.org</email>
</author>
<published>2009-03-21T22:21:18Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=c90d565a46a664663467557d381417a3153fe26e'/>
<id>urn:sha1:c90d565a46a664663467557d381417a3153fe26e</id>
<content type='text'>
Let PATH0=$PATH that was set before the invocation.
Let /foo be a build directory.
Let /pfx be the installation prefix.
Let pfxexecpath=/pfx/libexec/git-core.

The following is going on when 'git --exec-path=/foo gc' is invoked:

1. git sets PATH=/foo:$PATH0 using the path from --exec-path

2. gc execs 'git repack' (note: no dash).

3. Since there is a git in /foo (it's a build directory), /foo/git is
   taken.

4. No explicit exec-path is set this time, hence, this secondary git sets
   PATH=$pfxexecpath:/foo:$PATH

5. Since 'repack' is not a built-in, execv_dashed_external execs
   'git-repack' (note: dash).

6. There is a $pfxexecpath/git-repack, and it is taken.

7. This git-repack runs 'git pack-objects' (note: no dash).

8. There is no git in $pfxexecpath, but there is one in /foo. Hence,
   /foo/git is run.

9. pack-objects is a builtin, hence, in effect /foo/git-pack-objects
   is run.

As you can see, the way in which we previously set the PATH allowed to
mix gits of different vintage.  By setting GIT_EXEC_PATH when --exec-path
was given on the command line, we reduce the confusion.

Signed-off-by: Johannes Sixt &lt;j6t@kdbg.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
<entry>
<title>system_path(): simplify using strip_path_suffix(), and add suffix "git"</title>
<updated>2009-02-20T06:47:39Z</updated>
<author>
<name>Johannes Schindelin</name>
<email>johannes.schindelin@gmx.de</email>
</author>
<published>2009-02-19T19:10:53Z</published>
<link rel='alternate' type='text/html' href='http://git.kilabit.info/git/commit/?id=024aa7d8d5114f76e616a0ed8ddcf3b463ff2c14'/>
<id>urn:sha1:024aa7d8d5114f76e616a0ed8ddcf3b463ff2c14</id>
<content type='text'>
At least for the author of this patch, the logic in system_path() was
too hard to understand.  Using the function strip_path_suffix() documents
the idea of the code better.

The real change is to add the suffix "git", so that a runtime prefix will
be computed correctly even when the executable was called in /git/ as is
the case in msysGit (Windows insists to search the current directory
before the PATH when looking for an executable).

Signed-off-by: Johannes Schindelin &lt;johannes.schindelin@gmx.de&gt;
Acked-by: Johannes Sixt &lt;j6t@kdbg.org&gt;
Signed-off-by: Junio C Hamano &lt;gitster@pobox.com&gt;
</content>
</entry>
</feed>
