Merge branch 'master' into windows
Conflicts: Annex/Environment.hs Build/Configure.hs Git/Construct.hs Utility/FileMode.hs
This commit is contained in:
commit
dc66b1f27d
51 changed files with 678 additions and 87 deletions
|
@ -23,6 +23,8 @@ module Git.Construct (
|
|||
checkForRepo,
|
||||
) where
|
||||
|
||||
{-# LANGUAGE CPP #-}
|
||||
|
||||
#ifndef __WINDOWS__
|
||||
import System.Posix.User
|
||||
#endif
|
||||
|
@ -143,6 +145,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
|
||||
|
@ -176,6 +181,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. -}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue