]> git.ipfire.org Git - thirdparty/git.git/commit
mingw: allow `mingw_chdir()` to change to symlink-resolved directories
authorKarsten Blees <blees@dcon.de>
Wed, 17 Dec 2025 14:08:49 +0000 (14:08 +0000)
committerJunio C Hamano <gitster@pobox.com>
Wed, 17 Dec 2025 23:22:19 +0000 (08:22 +0900)
commit8a08d14d0537aa46f89c205c0f33130d9fbff648
tree7143011ee1016280b676d0a44404d4cc9af8c85f
parentc4314a6aa8fbb9a00d6068135fe19b5637a6992a
mingw: allow `mingw_chdir()` to change to symlink-resolved directories

If symlinks are enabled, resolve all symlinks when changing directories,
as required by POSIX.

Note: Git's `real_path()` function bases its link resolution algorithm
on this property of `chdir()`. Unfortunately, the current directory on
Windows is limited to only MAX_PATH (260) characters. Therefore using
symlinks and long paths in combination may be problematic.

Signed-off-by: Karsten Blees <blees@dcon.de>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
compat/mingw.c