diff options
author | Joey Hess <joey@kitenet.net> | 2010-12-31 15:52:59 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2010-12-31 15:52:59 -0400 |
commit | 30e0065ab97843f866a7fe095b8a18ee6eb4c321 (patch) | |
tree | 25ad127c79f96dbde8652b6cd8cfb39fba1944bc /Remotes.hs | |
parent | eac433a84ad397e371300343b7cd30b7741ee023 (diff) |
tuple makes it clearer
Diffstat (limited to 'Remotes.hs')
-rw-r--r-- | Remotes.hs | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/Remotes.hs b/Remotes.hs index 841fe947f..70356de02 100644 --- a/Remotes.hs +++ b/Remotes.hs @@ -119,7 +119,7 @@ inAnnex r key = if Git.repoIsUrl r Annex.eval a (Core.inAnnex key) checkremote = do showNote ("checking " ++ Git.repoDescribe r ++ "...") - inannex <- onRemote r boolSystem False "inannex" + inannex <- onRemote r (boolSystem, False) "inannex" ["--backend=" ++ backendName key, keyName key] return $ Right inannex @@ -200,7 +200,7 @@ byName name = do tryGitConfigRead :: Git.Repo -> Annex (Either Git.Repo Git.Repo) tryGitConfigRead r | not $ Map.null $ Git.configMap r = return $ Right r -- already read - | Git.repoIsSsh r = store $ onRemote r pipedconfig r "configlist" [] + | Git.repoIsSsh r = store $ onRemote r (pipedconfig, r) "configlist" [] | Git.repoIsUrl r = return $ Left r | otherwise = store $ safely $ Git.configRead r where @@ -275,12 +275,11 @@ remoteCopyFile recv r src dest = do {- Uses a supplied function to run a git-annex-shell command on a remote. -} onRemote :: Git.Repo - -> (String -> [String] -> IO a) - -> a + -> ((String -> [String] -> IO a), a) -> String -> [String] -> Annex a -onRemote r with errorval command params +onRemote r (with, errorval) command params | not $ Git.repoIsUrl r = liftIO $ with shellcmd shellopts | Git.repoIsSsh r = do sshoptions <- repoConfig r "ssh-options" "" |