tuple makes it clearer
This commit is contained in:
parent
eac433a84a
commit
30e0065ab9
2 changed files with 5 additions and 6 deletions
|
@ -136,7 +136,7 @@ fromPerform move key = do
|
||||||
else return Nothing -- fail
|
else return Nothing -- fail
|
||||||
fromCleanup :: Bool -> Git.Repo -> Key -> CommandCleanup
|
fromCleanup :: Bool -> Git.Repo -> Key -> CommandCleanup
|
||||||
fromCleanup True remote key = do
|
fromCleanup True remote key = do
|
||||||
ok <- Remotes.onRemote remote boolSystem False "dropkey"
|
ok <- Remotes.onRemote remote (boolSystem, False) "dropkey"
|
||||||
["--quiet", "--force",
|
["--quiet", "--force",
|
||||||
"--backend=" ++ backendName key,
|
"--backend=" ++ backendName key,
|
||||||
keyName key]
|
keyName key]
|
||||||
|
|
|
@ -119,7 +119,7 @@ inAnnex r key = if Git.repoIsUrl r
|
||||||
Annex.eval a (Core.inAnnex key)
|
Annex.eval a (Core.inAnnex key)
|
||||||
checkremote = do
|
checkremote = do
|
||||||
showNote ("checking " ++ Git.repoDescribe r ++ "...")
|
showNote ("checking " ++ Git.repoDescribe r ++ "...")
|
||||||
inannex <- onRemote r boolSystem False "inannex"
|
inannex <- onRemote r (boolSystem, False) "inannex"
|
||||||
["--backend=" ++ backendName key, keyName key]
|
["--backend=" ++ backendName key, keyName key]
|
||||||
return $ Right inannex
|
return $ Right inannex
|
||||||
|
|
||||||
|
@ -200,7 +200,7 @@ byName name = do
|
||||||
tryGitConfigRead :: Git.Repo -> Annex (Either Git.Repo Git.Repo)
|
tryGitConfigRead :: Git.Repo -> Annex (Either Git.Repo Git.Repo)
|
||||||
tryGitConfigRead r
|
tryGitConfigRead r
|
||||||
| not $ Map.null $ Git.configMap r = return $ Right r -- already read
|
| 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
|
| Git.repoIsUrl r = return $ Left r
|
||||||
| otherwise = store $ safely $ Git.configRead r
|
| otherwise = store $ safely $ Git.configRead r
|
||||||
where
|
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. -}
|
{- Uses a supplied function to run a git-annex-shell command on a remote. -}
|
||||||
onRemote
|
onRemote
|
||||||
:: Git.Repo
|
:: Git.Repo
|
||||||
-> (String -> [String] -> IO a)
|
-> ((String -> [String] -> IO a), a)
|
||||||
-> a
|
|
||||||
-> String
|
-> String
|
||||||
-> [String]
|
-> [String]
|
||||||
-> Annex a
|
-> Annex a
|
||||||
onRemote r with errorval command params
|
onRemote r (with, errorval) command params
|
||||||
| not $ Git.repoIsUrl r = liftIO $ with shellcmd shellopts
|
| not $ Git.repoIsUrl r = liftIO $ with shellcmd shellopts
|
||||||
| Git.repoIsSsh r = do
|
| Git.repoIsSsh r = do
|
||||||
sshoptions <- repoConfig r "ssh-options" ""
|
sshoptions <- repoConfig r "ssh-options" ""
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue