make clear that log is only updated after successful removal

This does not change behavior, because an exception is thrown on
unsuccessful removal. But is clearer.
This commit is contained in:
Joey Hess 2016-12-09 12:54:18 -04:00
parent bdf2a31424
commit 0f3a3ff1e5
No known key found for this signature in database
GPG key ID: C910D9222512E3C7

View file

@ -356,9 +356,9 @@ dropKey r key
commitOnCleanup r $ onLocal r $ do
ensureInitialized
whenM (Annex.Content.inAnnex key) $ do
Annex.Content.lockContentForRemoval key
Annex.Content.lockContentForRemoval key $ do
Annex.Content.removeAnnex
logStatus key InfoMissing
logStatus key InfoMissing
Annex.Content.saveState True
return True
| Git.repoIsHttp (repo r) = giveup "dropping from http remote not supported"