]> git.ipfire.org Git - thirdparty/git.git/commit
mingw: allow `mingw_chdir()` to change to symlink-resolved directories
authorKarsten Blees <karsten.blees@gmail.com>
Fri, 9 Jan 2026 20:05:09 +0000 (20:05 +0000)
committerJunio C Hamano <gitster@pobox.com>
Sat, 10 Jan 2026 02:32:55 +0000 (18:32 -0800)
commit43745a7d55daa1aa0937a3c6e8b521bd026a31f1
tree7fa87f23d96dec5a0e4038a71ccaf620632c7491
parent5e88e98c04267b44e4f822f297c60e1e8c852411
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 <karsten.blees@gmail.com>
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
compat/mingw.c