diff options
author | Joey Hess <joey@kitenet.net> | 2010-11-01 00:04:53 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2010-11-01 00:04:53 -0400 |
commit | 99c522edeff6add3ece41922f862c59b5afdddbe (patch) | |
tree | cbeb49c44117e9a8c41740508a276f92a216dd73 /Remotes.hs | |
parent | 0bd7ebbf356c2753fbd6e29b925efef0b4eb3f74 (diff) |
finished adding support for annex.ssh-options
Diffstat (limited to 'Remotes.hs')
-rw-r--r-- | Remotes.hs | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Remotes.hs b/Remotes.hs index c28ba5afe..bb77b00b3 100644 --- a/Remotes.hs +++ b/Remotes.hs @@ -94,8 +94,8 @@ inAnnex r key = do Annex.eval a (Core.inAnnex key) checkremote = do Core.showNote ("checking " ++ Git.repoDescribe r ++ "...") - inannex <- runCmd r ("test -e " ++ - (shellEscape $ annexLocation r key)) [] + inannex <- runCmd r "test" + [ "-e", (shellEscape $ annexLocation r key)] -- XXX Note that ssh failing and the file not existing -- are not currently differentiated. return $ Right inannex @@ -172,11 +172,12 @@ commandLineRemote = do - returns the updated git repo. -} tryGitConfigRead :: Git.Repo -> Annex (Either Git.Repo Git.Repo) tryGitConfigRead r = do + sshoptions <- repoConfig r "annex-ssh-options" "" if (Map.null $ Git.configMap r) then do -- configRead can fail due to IO error or -- for other reasons; catch all possible exceptions - result <- liftIO $ (try (Git.configRead r)::IO (Either SomeException (Git.Repo))) + result <- liftIO $ (try (Git.configRead r $ Just $ words sshoptions)::IO (Either SomeException (Git.Repo))) case (result) of Left _ -> return $ Left r Right r' -> do |