mirror of
https://github.com/facebook/sapling.git
synced 2024-10-10 16:57:49 +03:00
a75af7a63d
Summary: Previously, when that code was ported on Windows, paths separator were converted from '\' to '/' when a wide string was provided, all the other paths were treated as is. The main issue with this strategy is that not all paths can be converted, the non-stored ones for instance are immutable, which leads to some subtle bugs down the line. For instance, the paths: "Z:/foo/bar/baz" and "Z:\foo/bar\baz" would not be equal as the path separator isn't the same, but both of these are actually the same path underneath. To solve this, this diff first introduce a Windows path separator, and then modifies the path comparison functions to ignore the path separator and only compare the components. I'm definitively not a fan of the pattern I use for searching for both / and \ in paths, suggestions are welcome for how to improve that. Reviewed By: chadaustin Differential Revision: D24376980 fbshipit-source-id: 0702bf775c7c3937b2138abd5a63d339ac80aaed |
||
---|---|---|
.. | ||
git | ||
test | ||
Blob.h | ||
CMakeLists.txt | ||
Hash.cpp | ||
Hash.h | ||
ParentCommits.cpp | ||
ParentCommits.h | ||
Tree.cpp | ||
Tree.h | ||
TreeEntry.cpp | ||
TreeEntry.h |