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
4
Seek.hs
4
Seek.hs
|
@ -91,9 +91,9 @@ withKeys a params = return $ map (a . parse) params
|
|||
- a conversion function, and then is passed into the seek action.
|
||||
- This ensures that the conversion function only runs once.
|
||||
-}
|
||||
withField :: String -> (Maybe String -> a) -> (a -> CommandSeek) -> CommandSeek
|
||||
withField :: String -> (Maybe String -> Annex a) -> (a -> CommandSeek) -> CommandSeek
|
||||
withField field converter a ps = do
|
||||
f <- converter <$> Annex.getField field
|
||||
f <- converter =<< Annex.getField field
|
||||
a f ps
|
||||
|
||||
withNothing :: CommandStart -> CommandSeek
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue