look up --to and --from remote names only once

This will speed up commands like move and drop.
This commit is contained in:
Joey Hess 2012-01-06 04:02:35 -04:00
parent 0a36f92a31
commit df21cbfdd2
10 changed files with 30 additions and 33 deletions

View file

@ -66,7 +66,7 @@ checkUnused = do
checkRemoteUnused :: String -> CommandPerform
checkRemoteUnused name = do
checkRemoteUnused' =<< Remote.byName name
checkRemoteUnused' =<< fromJust <$> Remote.byName (Just name)
next $ return True
checkRemoteUnused' :: Remote -> Annex ()