fix mingw stat() and lstat() implementations for handling symlinks
commit4bdab4f285d035db41567c23e921a6902bc303de
authorPat Thoyts <patthoyts@users.sourceforge.net>
Wed, 17 Mar 2010 15:17:34 +0000 (17 15:17 +0000)
committerlmfadmin <lmfadmin@ubuntu.ubuntu-domain>
Fri, 3 Sep 2010 12:28:42 +0000 (3 13:28 +0100)
treeac8fb1bd86c4e007744d05123f929d1b5023e726
parent91c47c7af0bf823a607386d94df2437630f4c413
fix mingw stat() and lstat() implementations for handling symlinks

In msysGit the stat() function has been implemented using mingw_lstat
which sets the st_mode member to S_IFLNK when a symbolic links is found.
This causes the is_executable function to return when git attempts to
build a list of available commands in the help code and we end up missing
most git commands. (msysGit issue #445)

This patch modifies the implementation so that lstat() will return the link
flag but if we are called as stat() we read the size of the target and set
the mode to that of a regular file.

Signed-off-by: Pat Thoyts <patthoyts@users.sourceforge.net>
compat/mingw.c
compat/mingw.h