summaryrefslogtreecommitdiff
path: root/Command/Lock.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2016-01-26 14:28:43 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2016-01-26 14:28:43 -0400
commit4ba917a7a5f67e96c3848ae13c6eaa9eba6300c5 (patch)
tree9a204ed076e46d14ba3dc3a97f7606af10b63de7 /Command/Lock.hs
parentd059f667d346e1d95a005ea946c41bb69d1dc586 (diff)
Fix nasty reversion in the last release that broke sync --content's handling of many preferred content expressions.
The type checker should have noticed this, but the changes to mapM that make it accept any Traversable hid the fact that it was not being passed a list at all. Thus, what should have returned an empty list most of the time instead returned [""] which was treated as the name of the associated file, with disasterout consequences. When I have time, I should add a test case checking what sync --content drops. I should also consider replacing mapM with one re-specialized to lists.
Diffstat (limited to 'Command/Lock.hs')
-rw-r--r--Command/Lock.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/Command/Lock.hs b/Command/Lock.hs
index 9611d2407..f002f016a 100644
--- a/Command/Lock.hs
+++ b/Command/Lock.hs
@@ -86,7 +86,7 @@ performNew file key filemodified = do
repopulate obj
| filemodified = modifyContent obj $ do
g <- Annex.gitRepo
- fs <- mapM (`fromTopFilePath` g)
+ fs <- map (`fromTopFilePath` g)
<$> Database.Keys.getAssociatedFiles key
mfile <- firstM (isUnmodified key) fs
liftIO $ nukeFile obj