look up --to and --from remote names only once
This will speed up commands like move and drop.
This commit is contained in:
parent
0a36f92a31
commit
df21cbfdd2
10 changed files with 30 additions and 33 deletions
|
@ -51,10 +51,9 @@ start (unused, unusedbad, unusedtmp) s = search
|
|||
next $ a key
|
||||
|
||||
perform :: Key -> CommandPerform
|
||||
perform key = maybe droplocal dropremote =<< Annex.getField "from"
|
||||
perform key = maybe droplocal dropremote =<< Remote.byName =<< Annex.getField "from"
|
||||
where
|
||||
dropremote name = do
|
||||
r <- Remote.byName name
|
||||
dropremote r = do
|
||||
showAction $ "from " ++ Remote.name r
|
||||
ok <- Remote.removeKey r key
|
||||
next $ Command.Drop.cleanupRemote key r ok
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue