diff options
Diffstat (limited to 'Annex')
-rwxr-xr-x | Annex/Branch.hs | 6 | ||||
-rwxr-xr-x | Annex/Content/Direct.hs | 2 | ||||
-rwxr-xr-x | Annex/Direct.hs | 2 | ||||
-rwxr-xr-x | Annex/Environment.hs | 10 | ||||
-rwxr-xr-x | Annex/Link.hs | 2 | ||||
-rwxr-xr-x | Annex/Perms.hs | 1 | ||||
-rwxr-xr-x | Annex/Ssh.hs | 8 |
7 files changed, 4 insertions, 27 deletions
diff --git a/Annex/Branch.hs b/Annex/Branch.hs index 8c3fb41f6..9a89a65c3 100755 --- a/Annex/Branch.hs +++ b/Annex/Branch.hs @@ -24,11 +24,6 @@ module Annex.Branch ( ) where import qualified Data.ByteString.Lazy.Char8 as L -#ifdef __ANDROID__ -import System.Posix.Env (getEnv) -#else -import System.Environment (getEnvironment) -#endif import Common.Annex import Annex.BranchState @@ -45,6 +40,7 @@ import Git.FilePath import Annex.CatFile import Annex.Perms import qualified Annex +import Utility.Env {- Name of the branch that is used to store git-annex's information. -} name :: Git.Ref diff --git a/Annex/Content/Direct.hs b/Annex/Content/Direct.hs index 1aa3c9105..54befdf73 100755 --- a/Annex/Content/Direct.hs +++ b/Annex/Content/Direct.hs @@ -33,8 +33,6 @@ import Utility.TempFile import Logs.Location import Utility.InodeCache -import System.PosixCompat.Files - {- Absolute FilePaths of Files in the tree that are associated with a key. -} associatedFiles :: Key -> Annex [FilePath] associatedFiles key = do diff --git a/Annex/Direct.hs b/Annex/Direct.hs index 5d679eee6..596c90994 100755 --- a/Annex/Direct.hs +++ b/Annex/Direct.hs @@ -27,8 +27,6 @@ import Utility.InodeCache import Utility.CopyFile import Annex.Perms -import System.PosixCompat.Files - {- Uses git ls-files to find files that need to be committed, and stages - them into the index. Returns True if some changes were staged. -} stageDirect :: Annex Bool diff --git a/Annex/Environment.hs b/Annex/Environment.hs index fd757ee2c..33569386e 100755 --- a/Annex/Environment.hs +++ b/Annex/Environment.hs @@ -10,16 +10,10 @@ module Annex.Environment where import Common.Annex -#ifndef __WINDOWS__ +import Utility.Env import Utility.UserInfo -#endif import qualified Git.Config -#ifndef __WINDOWS__ -import System.Posix.Env -#endif -import Network.BSD - {- Checks that the system's environment allows git to function. - Git requires a GECOS username, or suitable git configuration, or - environment variables. -} @@ -41,7 +35,7 @@ checkEnvironmentIO = where #ifndef __ANDROID__ -- existing environment is not overwritten - ensureEnv var val = setEnv var val False + ensureEnv var val = void $ setEnv var val False #else -- Environment setting is broken on Android, so this is dealt with -- in runshell instead. diff --git a/Annex/Link.hs b/Annex/Link.hs index 0a72f75ca..931836d31 100755 --- a/Annex/Link.hs +++ b/Annex/Link.hs @@ -19,8 +19,6 @@ import qualified Git.UpdateIndex import qualified Annex.Queue import Git.Types -import System.PosixCompat.Files - type LinkTarget = String {- Checks if a file is a link to a key. -} diff --git a/Annex/Perms.hs b/Annex/Perms.hs index de01ae0f8..f5925b741 100755 --- a/Annex/Perms.hs +++ b/Annex/Perms.hs @@ -22,7 +22,6 @@ import qualified Annex import Config import System.Posix.Types -import System.PosixCompat.Files withShared :: (SharedRepository -> Annex a) -> Annex a withShared a = maybe startup a =<< Annex.getState Annex.shared diff --git a/Annex/Ssh.hs b/Annex/Ssh.hs index 56109774b..1f924ecad 100755 --- a/Annex/Ssh.hs +++ b/Annex/Ssh.hs @@ -14,9 +14,6 @@ module Annex.Ssh ( ) where import qualified Data.Map as M -#ifndef __WINDOWS__ -import System.Posix.Env -#endif import Common.Annex import Annex.LockPool @@ -24,6 +21,7 @@ import Annex.Perms import qualified Build.SysConfig as SysConfig import qualified Annex import Config +import Utility.Env {- Generates parameters to ssh to a given host (or user@host) on a given - port, with connection caching. -} @@ -78,11 +76,7 @@ sshCacheDir ) | otherwise = return Nothing where -#ifndef __WINDOWS__ gettmpdir = liftIO $ getEnv "GIT_ANNEX_TMP_DIR" -#else - gettmpdir = return Nothing -#endif usetmpdir tmpdir = liftIO $ catchMaybeIO $ do createDirectoryIfMissing True tmpdir return tmpdir |