git-lfs/git
brian m. carlson 73a581fb7d
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.
2019-03-12 18:14:58 +00:00
..
gitattr git/gitattr: add a macro processor 2018-12-03 17:18:49 +00:00
githistory tasklog: don't log progress status when stdout is not a tty 2018-11-14 14:35:29 -08:00
attribs.go git: look up default global attributes file if none specified 2018-12-03 17:18:50 +00:00
config_test.go git: provide a read-only configuration object 2018-10-26 15:27:54 +00:00
config.go git: provide a read-only configuration object 2018-10-26 15:27:54 +00:00
filter_process_scanner_test.go Merge pull request #2471 from git-lfs/git-pl-write-list 2017-08-04 09:10:28 -06:00
filter_process_scanner.go git: remove low value debug message 2017-10-27 09:51:45 -06:00
filter_process_status.go git: introduce type 'FilterProcessStatus' 2017-08-24 18:28:50 -04:00
git_test.go git/git.go: remove git.RefTypeRemoteTag 2018-09-25 14:38:45 -07:00
git.go git: handle Windows junctions properly 2019-03-12 18:14:58 +00:00
object_scanner.go git: close object database when done 2019-01-15 18:53:09 +00:00
pkt_line_reader_test.go filter-process: fix reading 1024 byte files 2016-11-22 12:21:48 +01:00
pkt_line_reader.go git: remove extraneous length check 2016-11-22 10:57:18 -07:00
pkt_line_test.go git/pl: flush underlying *bufio.Writer only when necessary 2016-11-15 14:35:21 -07:00
pkt_line_writer_test.go git: teach *PktlineWriter.Flush() to respond to nil receiver 2017-08-02 13:26:38 -06:00
pkt_line_writer.go git: teach *PktlineWriter.Flush() to respond to nil receiver 2017-08-02 13:26:38 -06:00
pkt_line.go git/pl: document pkt-line behavior 2016-11-15 14:35:21 -07:00
refs_test.go git: port over existing commands.refUpdate tests 2018-01-05 15:18:17 -07:00
refs.go git: remove unnecessary debug trace messages 2018-01-17 11:06:23 -07:00
rev_list_scanner_test.go git: prefer sending revisions over STDIN than arguments 2017-11-17 09:41:19 -08:00
rev_list_scanner.go git: prefer sending revisions over STDIN than arguments 2017-11-17 09:41:19 -08:00
version.go git/version.go: replace sync.Mutex usage with sync.Once 2019-01-23 15:42:32 -08:00