diff options
author | Joey Hess <joey@kitenet.net> | 2014-08-20 20:08:45 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2014-08-20 20:13:47 -0400 |
commit | 28ac29b518a49363788b3607130cee5aff5534e9 (patch) | |
tree | 25985e4f7937c64e662ef5447651f4e44d2b9cbf /Command/DropKey.hs | |
parent | 6f8f6b7dde108168ac5a9f0b3fb2cb8ea2d2f60c (diff) |
use types to enforce that removeAnnex can only be called inside lockContent
This fixed one bug where it needed to be and wasn't (in Assistant.Unused).
And also found one place where lockContent was used unnecessarily (by
drop --from remote).
A few other places like uninit probably don't really need to lockContent,
but it doesn't hurt to do call it anyway.
This commit was sponsored by David Wagner.
Diffstat (limited to 'Command/DropKey.hs')
-rw-r--r-- | Command/DropKey.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Command/DropKey.hs b/Command/DropKey.hs index 125e6ded4..8ca41bdb6 100644 --- a/Command/DropKey.hs +++ b/Command/DropKey.hs @@ -28,8 +28,8 @@ start key = stopUnless (inAnnex key) $ do next $ perform key perform :: Key -> CommandPerform -perform key = lockContent key $ do - removeAnnex key +perform key = lockContent key $ \contentlock -> do + removeAnnex contentlock next $ cleanup key cleanup :: Key -> CommandCleanup |