Files
git/compat
Bill Zissimopoulos 3681d27b6f mingw: lstat: compute correct size for symlinks
This commit fixes mingw_lstat by computing the proper size for symlinks
according to POSIX. POSIX specifies that upon successful return from
lstat: "the value of the st_size member shall be set to the length of
the pathname contained in the symbolic link not including any
terminating null byte".

Prior to this commit the mingw_lstat function returned a fixed size of
4096. This caused problems in git repositories that were accessed by
git for Cygwin or git for WSL. For example, doing `git reset --hard`
using git for Windows would update the size of symlinks in the index
to be 4096; at a later time git for Cygwin or git for WSL would find
that symlinks have changed size during `git status`. Vice versa doing
`git reset --hard` in git for Cygwin or git for WSL would update the
size of symlinks in the index with the correct value, only for git for
Windows to find incorrectly at a later time that the size had changed.

Additional fixup by: Johannes Schindelin <johannes.schindelin@gmx.de>

Signed-off-by: Bill Zissimopoulos <billziss@navimatics.com>
2020-06-01 20:16:57 +02:00
..
2020-04-16 15:23:42 -07:00
2019-06-25 10:46:57 -07:00