more leaning toothpick fixes
This commit is contained in:
parent
dc66b1f27d
commit
7b92ffc3a1
1 changed files with 2 additions and 2 deletions
|
@ -58,7 +58,7 @@ fromPath dir = fromAbsPath =<< absPath dir
|
||||||
- specified. -}
|
- specified. -}
|
||||||
fromAbsPath :: FilePath -> IO Repo
|
fromAbsPath :: FilePath -> IO Repo
|
||||||
fromAbsPath dir
|
fromAbsPath dir
|
||||||
| "/" `isPrefixOf` dir =
|
| isAbsolute dir =
|
||||||
ifM (doesDirectoryExist dir') ( ret dir' , hunt )
|
ifM (doesDirectoryExist dir') ( ret dir' , hunt )
|
||||||
| otherwise =
|
| otherwise =
|
||||||
error $ "internal error, " ++ dir ++ " is not absolute"
|
error $ "internal error, " ++ dir ++ " is not absolute"
|
||||||
|
@ -71,7 +71,7 @@ fromAbsPath dir
|
||||||
{- When dir == "foo/.git", git looks for "foo/.git/.git",
|
{- When dir == "foo/.git", git looks for "foo/.git/.git",
|
||||||
- and failing that, uses "foo" as the repository. -}
|
- and failing that, uses "foo" as the repository. -}
|
||||||
hunt
|
hunt
|
||||||
| "/.git" `isSuffixOf` canondir =
|
| pathSeparator:".git" `isSuffixOf` canondir =
|
||||||
ifM (doesDirectoryExist $ dir </> ".git")
|
ifM (doesDirectoryExist $ dir </> ".git")
|
||||||
( ret dir
|
( ret dir
|
||||||
, ret $ takeDirectory canondir
|
, ret $ takeDirectory canondir
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue