summaryrefslogtreecommitdiff
path: root/t/t4013/diff.whatchanged_--root_--cc_--patch-with-stat_--summary_master
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2012-07-31 12:51:30 -0700
committerLibravatar Junio C Hamano <gitster@pobox.com>2012-07-31 12:51:30 -0700
commita78550831a42db6896e598cd2a8bfb441a958fc8 (patch)
tree0d71fe45ad75a9cdf32a18a65b2dad40fe651d69 /t/t4013/diff.whatchanged_--root_--cc_--patch-with-stat_--summary_master
parentrun-command: treat inaccessible directories as ENOENT (diff)
downloadtgif-a78550831a42db6896e598cd2a8bfb441a958fc8.tar.xz
sane_execvp(): ignore non-directory on $PATH
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:/bin/sh git -c alias.foo=show git foo -s fatal: cannot exec 'git-foo': Not a directory? This is because an ENOTDIR error from the underlying execvp(2) is reported back to the caller of our sane_execvp() wrapper as-is. Translating it to ENOENT, just like the case where we _might_ have the command in an unreadable directory, fixes it. Without an alias, we would get git: 'foo' is not a git command. See 'git --help'. and we use the 'foo' alias when it is available, of course. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/t4013/diff.whatchanged_--root_--cc_--patch-with-stat_--summary_master')
0 files changed, 0 insertions, 0 deletions