summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Git/Construct.hs10
-rw-r--r--doc/todo/windows_support.mdwn5
2 files changed, 10 insertions, 5 deletions
diff --git a/Git/Construct.hs b/Git/Construct.hs
index 633e50b6b..23022eb95 100644
--- a/Git/Construct.hs
+++ b/Git/Construct.hs
@@ -21,6 +21,8 @@ module Git.Construct (
checkForRepo,
) where
+{-# LANGUAGE CPP #-}
+
import System.Posix.User
import qualified Data.Map as M hiding (map, split)
import Network.URI
@@ -139,6 +141,9 @@ fromRemoteLocation :: String -> Repo -> IO Repo
fromRemoteLocation s repo = gen $ calcloc s
where
gen v
+#ifdef __WINDOWS__
+ | dosstyle v = fromRemotePath v repo
+#endif
| scpstyle v = fromUrl $ scptourl v
| urlstyle v = fromUrl v
| otherwise = fromRemotePath v repo
@@ -172,6 +177,11 @@ fromRemoteLocation s repo = gen $ calcloc s
| "/" `isPrefixOf` d = d
| "~" `isPrefixOf` d = '/':d
| otherwise = "/~/" ++ d
+#ifdef __WINDOWS__
+ -- git on Windows will write a path to .git/config with "drive:",
+ -- which is not to be confused with a "host:"
+ dosstyle = hasDrive
+#endif
{- Constructs a Repo from the path specified in the git remotes of
- another Repo. -}
diff --git a/doc/todo/windows_support.mdwn b/doc/todo/windows_support.mdwn
index 777dd0c67..a9276e2be 100644
--- a/doc/todo/windows_support.mdwn
+++ b/doc/todo/windows_support.mdwn
@@ -3,11 +3,6 @@ now! --[[Joey]]
## status
-* git-annex fails to access a clone located on the local machine
- (including other drives). It thinks that `c:\clone` is a ssh remote.
- (When Cygwin's build of git is used to make the clone, it puts the
- slashes the other way around in .git/config, which also doesn't work
- for git-annex.)
* Does not work with Cygwin's build of git (that git does not consistently
support use of DOS style paths, which git-annex uses on Windows).
Must use the upstream build of git for Windows.