From 28ac29b518a49363788b3607130cee5aff5534e9 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 20 Aug 2014 20:08:45 -0400 Subject: 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. --- Remote/Git.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Remote') diff --git a/Remote/Git.hs b/Remote/Git.hs index db5b2fbd0..bf796ec11 100644 --- a/Remote/Git.hs +++ b/Remote/Git.hs @@ -339,8 +339,8 @@ dropKey r key commitOnCleanup r $ onLocal r $ do ensureInitialized whenM (Annex.Content.inAnnex key) $ do - Annex.Content.lockContent key $ - Annex.Content.removeAnnex key + Annex.Content.lockContent key + Annex.Content.removeAnnex logStatus key InfoMissing Annex.Content.saveState True return True -- cgit v1.2.3