git/compat
Johannes Schindelin d08f0011ae mingw: do resolve symlinks in getcwd()
As pointed out in https://github.com/git-for-windows/git/issues/1676,
the `git rev-parse --is-inside-work-tree` command currently fails when
the current directory's path contains symbolic links.

The underlying reason for this bug is that `getcwd()` is supposed to
resolve symbolic links, but our `mingw_getcwd()` implementation did not.

We do have all the building blocks for that, though: the
`GetFinalPathByHandleW()` function will resolve symbolic links. However,
we only called that function if `GetLongPathNameW()` failed, for
historical reasons: the latter function was supported for a long time,
but the former API function was introduced only with Windows Vista, and
we used to support also Windows XP. With that support having been
dropped, we are free to call the symbolic link-resolving function right
away.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
2025-12-18 08:21:06 +09:00
..
2024-10-25 14:02:04 -04:00
2025-12-07 07:28:12 +09:00
2025-12-18 08:21:06 +09:00
2022-05-02 09:50:37 -07:00
2025-12-07 07:28:13 +09:00
2024-06-14 10:26:33 -07:00
2021-10-29 15:00:58 -07:00