Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Looking in the source of git, there's a comment in git.c:</p> <pre><code>/* * We use PATH to find git commands, but we prepend some higher * precedence paths: the "--exec-path" option, the GIT_EXEC_PATH * environment, and the $(gitexecdir) from the Makefile at build * time. */ </code></pre> <p>If you call <code>git --exec-path</code>, you end up calling <code>const char *git_exec_path(void)</code> in <a href="http://github.com/git/git/blob/master/exec_cmd.c#L72" rel="noreferrer">exec_cmd.c</a>. That looks like this:</p> <pre><code>const char *env; if (argv_exec_path) return argv_exec_path; env = getenv(EXEC_PATH_ENVIRONMENT); if (env &amp;&amp; *env) { return env; } return system_path(GIT_EXEC_PATH); </code></pre> <p>Now, _argv_exec_path_ is set when you say <code>--exec-path=/some/where</code> so can be discounted. You've stated that the environment variable isn't set. <code>GIT_EXEC_PATH</code> is defined during compilation in the <a href="http://github.com/git/git/blob/master/Makefile#L1508" rel="noreferrer">Makefile</a>. Going backwards, it seems to be defined as just <code>libexec/git-core</code>. So, we need to look at what <a href="http://github.com/git/git/blob/master/exec_cmd.c#L10" rel="noreferrer">system_path()</a> does instead.</p> <p>I'm not sure whether <code>RUNTIME_PREFIX</code> is defined for you. But while nosing in the Makefile, I did notice that <a href="http://github.com/git/git/blob/master/Makefile#L231" rel="noreferrer">prefix</a> defaults to <code>$(HOME)</code>. I suspect that this may be the cause of your problems.</p> <p>The simple answer is to put this in <code>~/.bashrc</code>:</p> <pre><code>export GIT_EXEC_PATH=/opt/local/libexec/git-core </code></pre> <p>If you want to find out more about what's going on, you'll probably have to recompile git using <code>port -d upgrade -f git-core</code> (or similar) and look closely at the build log to see where prefix is being set. Incidentally, <code>port cat git-core</code> shows heavy usage of <code>${prefix}</code> so it should (hopefully) be obvious.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload