Skip to contentSkip to conversation

use only the PATH for exec'ing git commands

PATCH Scott R Parish 2 participants 2 messages Jun 15, 2016

lore
Share & tools
lore
#0 lore raw
Quoted 6 lines

Alex Reisen, Mon, Oct 22, 2007 12:01:

Quoted 1 line

+ strbuf_addch(out, ':');

Shouldn't it break MingW32 native port?

<snip>

Quoted 4 lines

Review

Quoted 4 lines
(quoted diff) +4 -0
+        if (old_path)
+                strbuf_addstr(&amp;new_path, old_path);
+        else
+                strbuf_addstr(&amp;new_path,

"/usr/local/bin:/usr/bin:/bin");

Quoted 5 lines

the default PATH is platform-dependent. Git is multi-platform. You should consider putting the path list somewhere in Makefile, config.mak or configure.

The original code was already doing both of these things (see git.c's prepend_to_path())

sRp

#1 lore raw

Scott R Parish, Mon, Oct 22, 2007 21:59:01 +0200:

Quoted 5 lines
Quoted 5 lines
Quoted 4 lines
(quoted diff) +4 -0
+        if (old_path)
+                strbuf_addstr(&amp;new_path, old_path);
+        else
+                strbuf_addstr(&amp;new_path, "/usr/local/bin:/usr/bin:/bin");
Quoted 7 lines
Quoted 4 lines

the default PATH is platform-dependent. Git is multi-platform. You should consider putting the path list somewhere in Makefile, config.mak or configure.

The original code was already doing both of these things (see git.c's prepend_to_path())

Well, would be nice if your code was better in this respect.

Anyway, I suspect the mingw people will trash the code anyway sometime (or not, which is just as well - it is a rare case).