aboutsummaryrefslogtreecommitdiff
path: root/Command/Uninit.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2014-08-20 20:08:45 -0400
committerGravatar Joey Hess <joey@kitenet.net>2014-08-20 20:13:47 -0400
commit28ac29b518a49363788b3607130cee5aff5534e9 (patch)
tree25985e4f7937c64e662ef5447651f4e44d2b9cbf /Command/Uninit.hs
parent6f8f6b7dde108168ac5a9f0b3fb2cb8ea2d2f60c (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/Uninit.hs')
-rw-r--r--Command/Uninit.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/Command/Uninit.hs b/Command/Uninit.hs
index 4433de6d0..3f57782fc 100644
--- a/Command/Uninit.hs
+++ b/Command/Uninit.hs
@@ -103,7 +103,7 @@ removeUnannexed = go []
go c [] = return c
go c (k:ks) = ifM (inAnnexCheck k $ liftIO . enoughlinks)
( do
- removeAnnex k
+ lockContent k removeAnnex
go c ks
, go (k:c) ks
)