remove Preparer abstraction
That had almost no benefit at all, and complicated things quite a lot. What I proably wanted this to be was something like ResourceT, but it was not. The few remotes that actually need some preparation done only once and reused used a MVar and not Preparer.
This commit is contained in:
parent
49bf7c8403
commit
b50ee9cd0c
15 changed files with 93 additions and 122 deletions
|
@ -12,10 +12,6 @@ import Utility.Metered
|
|||
|
||||
import qualified Data.ByteString.Lazy as L
|
||||
|
||||
-- Prepares for and then runs an action that will act on a Key's
|
||||
-- content, passing it a helper when the preparation is successful.
|
||||
type Preparer helper = Key -> (Maybe helper -> Annex Bool) -> Annex Bool
|
||||
|
||||
-- A source of a Key's content.
|
||||
data ContentSource
|
||||
= FileContent FilePath
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue