Re: [PATCH/RFC] sane_execvp(): ignore non-directory on PATH

2012-07-31 Thread Jeff King
On Tue, Jul 31, 2012 at 12:46:13PM -0700, Junio C Hamano wrote: > When you have a non-directory on your PATH, a funny thing happens: > > $ PATH=$PATH:/bin/sh git foo > fatal: cannot exec 'git-foo': Not a directory? > > Worse yet, as real commands always take precedence over aliases,

[PATCH/RFC] sane_execvp(): ignore non-directory on PATH

2012-07-31 Thread Junio C Hamano
When you have a non-directory on your PATH, a funny thing happens: $ PATH=$PATH:/bin/sh git foo fatal: cannot exec 'git-foo': Not a directory? Worse yet, as real commands always take precedence over aliases, this behaviour interacts rather badly with them: $ PATH=$PATH:/b