diff options
author | Joey Hess <joey@kitenet.net> | 2014-02-07 17:10:51 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2014-02-07 17:15:18 -0400 |
commit | a45c6f8173910364b69d77c1765cd7afd1431028 (patch) | |
tree | 1110891580fb279d7af7f1242b771d59d54eef27 /Test.hs | |
parent | 7343c02bcd6cbb40718e142be3d9bf99cc9c11bd (diff) |
eliminating absNormPath
git-annex has been using MissingH's `abdNormPath` forever, but that's
unmaintained and possibly buggy, and doesn't work on Windows. I've been
wanting to get rid of it for some time, and finally did today, writing a
`simplifyPath` that does the things git-annex needs and will work with all
the Windows filename craziness, and takes advantage of the more modern
System.FilePath to be quite a simple peice of code. A QuickCheck test found
no important divergences from absNormPath. A good first step to making
git-annex not depend on MissingH at all.
And it fixed some weird behaviors on Windows like
`git annex add ..\subdir\file` not working.
Note that absNormPathUnix has been left alone for now.
Diffstat (limited to 'Test.hs')
-rw-r--r-- | Test.hs | 4 |
1 files changed, 0 insertions, 4 deletions
@@ -1071,14 +1071,10 @@ test_add_subdirs env = intmpclonerepo env $ do l <- annexeval $ encodeW8 . L.unpack <$> Annex.CatFile.catObject (Git.Types.Ref "HEAD:dir/foo") "../.git/annex/" `isPrefixOf` l @? ("symlink from subdir to .git/annex is wrong: " ++ l) -#ifndef mingw32_HOST_OS - {- This does not work on Windows, for whatever reason. -} createDirectory "dir2" writeFile ("dir2" </> "foo") $ content annexedfile setCurrentDirectory "dir" git_annex env "add" [".." </> "dir2"] @? "add of ../subdir failed" -#endif - -- This is equivilant to running git-annex, but it's all run in-process -- (when the OS allows) so test coverage collection works. |