# Re: [PATCH] use only the PATH for exec'ing git commands

2 messages from 2007-10-22 to 2007-10-22. Participants: Scott R Parish, Alex Riesen.
Thread: https://gitlist.dev/t/10433

## Scott R Parish, 2007-10-22 19:59

Subject: Re: [PATCH] use only the PATH for exec'ing git commands
Message-ID: <1193083141.v2.fusewebmail-240137@f>
URL: https://gitlist.dev/e/1193083141.v2.fusewebmail-240137%40f

```

> Alex Reisen, Mon, Oct 22, 2007 12:01:
> > +                strbuf_addch(out, ':');
>
> Shouldn't it break MingW32 native port?
>

<snip>

> > +        if (old_path)
> > +                strbuf_addstr(&amp;new_path, old_path);
> > +        else
> > +                strbuf_addstr(&amp;new_path,
"/usr/local/bin:/usr/bin:/bin");
>
> 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

```

## Alex Riesen, 2007-10-22 20:57

Subject: Re: [PATCH] use only the PATH for exec'ing git commands
Message-ID: <20071022205737.GC23714@steel.home>
URL: https://gitlist.dev/e/20071022205737.GC23714%40steel.home
In-Reply-To: <1193083141.v2.fusewebmail-240137@f>

```
Scott R Parish, Mon, Oct 22, 2007 21:59:01 +0200:
> > > +        if (old_path)
> > > +                strbuf_addstr(&amp;new_path, old_path);
> > > +        else
> > > +                strbuf_addstr(&amp;new_path, "/usr/local/bin:/usr/bin:/bin");
> >
> > 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).

```
