• P
    MinGW: fix stat() and lstat() implementations for handling symlinks · 9b9784ca
    Pat Thoyts 提交于
    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.
    
    Includes squashed fix st_mode for symlink dirs
    Signed-off-by: NPat Thoyts <patthoyts@users.sourceforge.net>
    Signed-off-by: NErik Faye-Lund <kusmabite@gmail.com>
    9b9784ca
mingw.h 8.4 KB