Fix creating native symlinks pointing to ..
#101
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Git's test suite currently does not pass under
MSYS=winsymlinks:nativestrict
. Most of those issues need to be addressed in Git, as they are either due to incorrect assumptions, or due to bugs in the symlink support code.However, one of the issues is in a test that first creates a symlink pointing to
..
and later verifies that following that symlink incat-file
works: Instead of creating a link to..
,ln -s
creates a link to../../$(basename "$PWD")
. This link still points to the same entity, but it is incorrect, and not due to a bug in Git, but due to a bug in the MSYS2 runtime.This fixes t1006.311(git cat-file --batch-check --follow-symlinks works for .. links).
I contributed this fix to the Cygwin project here: https://inbox.sourceware.org/cygwin-patches/6058889e2ae8c9c827a8d6678f09b3b1741e2fcf.1750413578.git.johannes.schindelin@gmx.de/T/#u.