Permalink
Please
sign in to comment.
Browse files
git: handle Windows junctions properly
On Windows, there is the concept of a junction point, which is a by-name reference from the junction point to a directory using an absolute path. Go's filepath.EvalSymlinks resolves this and provides a canonical path. However, Git for Windows ignores them and provides a path containing junctions, despite the fact that Unix versions of Git always provide an absolute path. When locking, we canonicalize paths on Windows before making them relative to the root, meaning that if junctions are used, the lock path contains a ".." component, which breaks unlocking. Canonicalize the paths we get from Git so that we can be confident that lock paths will be relative. This case cannot, unfortunately, be easily tested in our testsuite, since the Git Bash environment lacks support for invoking the system mklink.exe utility, which is used to create junctions.
- Loading branch information...
0 comments on commit
73a581f