summaryrefslogtreecommitdiff
path: root/Git/Construct.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <id@joeyh.name>2013-05-14 16:32:03 -0500
committerGravatar Joey Hess <id@joeyh.name>2013-05-14 16:32:03 -0500
commit5b016d04f85e3acde643a4476d1ed5802bdce044 (patch)
tree4344491471fc9755fbc1f641e71f60af1edd1782 /Git/Construct.hs
parent3e27b7d44a2d8f4d8d92fbc1142d0c087a8d3dc8 (diff)
fill in a few windows stubs
Diffstat (limited to 'Git/Construct.hs')
-rwxr-xr-x[-rw-r--r--]Git/Construct.hs7
1 files changed, 4 insertions, 3 deletions
diff --git a/Git/Construct.hs b/Git/Construct.hs
index b947abd89..54eb84e22 100644..100755
--- a/Git/Construct.hs
+++ b/Git/Construct.hs
@@ -34,6 +34,7 @@ import Network.URI
import Common
import Git.Types
import Git
+import Git.FilePath
import qualified Git.Url as Url
import Utility.UserInfo
@@ -58,8 +59,7 @@ fromPath dir = fromAbsPath =<< absPath dir
- specified. -}
fromAbsPath :: FilePath -> IO Repo
fromAbsPath dir
- | isAbsolute dir =
- ifM (doesDirectoryExist dir') ( ret dir' , hunt )
+ | isAbsolute dir = ifM (doesDirectoryExist dir') ( ret dir' , hunt )
| otherwise =
error $ "internal error, " ++ dir ++ " is not absolute"
where
@@ -146,7 +146,7 @@ fromRemoteLocation s repo = gen $ calcloc s
where
gen v
#ifdef __WINDOWS__
- | dosstyle v = fromRemotePath v repo
+ | dosstyle v = fromRemotePath (dospath v) repo
#endif
| scpstyle v = fromUrl $ scptourl v
| urlstyle v = fromUrl v
@@ -185,6 +185,7 @@ fromRemoteLocation s repo = gen $ calcloc s
-- git on Windows will write a path to .git/config with "drive:",
-- which is not to be confused with a "host:"
dosstyle = hasDrive
+ dospath = fromInternalGitPath
#endif
{- Constructs a Repo from the path specified in the git remotes of