Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix t2040 #2415

Merged
merged 1 commit into from
Nov 25, 2019
Merged

Fix t2040 #2415

merged 1 commit into from
Nov 25, 2019

Conversation

dscho
Copy link
Member

@dscho dscho commented Nov 25, 2019

It seems that the current agents of the Azure Pipeline pool vs2017-win2016 are not actually Windows 2016, as the cmd.exe /c 'type [...]' call contains the tell-tale

Microsoft Windows [Version 6.3.9600]

... and the test fails that tries to verify that symbolic links are created with the correct type (on Windows, symbolic links have a defined target type: directory or file).

Let's fix that by not using cmd.exe /c 'type [...]' to read the files (and thereby resolving the symbolic links), but by using git config -f [...] instead (which also resolves the symbolic links).

A more complete fix would be to add a test helper that verifies the actual type of the symbolic link; The advantage of the current approach is that it tests the code flow that we actually need to keep working.

To verify that the symlink is resolved correctly, we use the fact that
`git.exe` is a native Win32 program, and that `git.exe config -f <path>`
therefore uses the native symlink resolution.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
@dscho dscho changed the title [DO-NOT-MERGE-YET] Fix t2040 Fix t2040 Nov 25, 2019
@dscho dscho merged commit 99d1fe0 into git-for-windows:master Nov 25, 2019
@dscho dscho deleted the fix-t2040 branch November 25, 2019 13:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant