summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Assistant/Threads/Committer.hs14
-rw-r--r--debian/changelog2
2 files changed, 9 insertions, 7 deletions
diff --git a/Assistant/Threads/Committer.hs b/Assistant/Threads/Committer.hs
index 5c7332ba6..d1fa7224e 100644
--- a/Assistant/Threads/Committer.hs
+++ b/Assistant/Threads/Committer.hs
@@ -5,7 +5,7 @@
- Licensed under the GNU GPL version 3 or higher.
-}
-{-# LANGUAGE CPP, BangPatterns #-}
+{-# LANGUAGE CPP #-}
module Assistant.Threads.Committer where
@@ -273,10 +273,11 @@ handleAdds :: Maybe Seconds -> [Change] -> Assistant [Change]
handleAdds delayadd cs = returnWhen (null incomplete) $ do
let (pending, inprocess) = partition isPendingAddChange incomplete
direct <- liftAnnex isDirect
- pending' <- if direct
- then return pending
+ (pending', cleanup) <- if direct
+ then return (pending, noop)
else findnew pending
(postponed, toadd) <- partitionEithers <$> safeToAdd delayadd pending' inprocess
+ cleanup
unless (null postponed) $
refillChanges postponed
@@ -294,14 +295,13 @@ handleAdds delayadd cs = returnWhen (null incomplete) $ do
where
(incomplete, otherchanges) = partition (\c -> isPendingAddChange c || isInProcessAddChange c) cs
- findnew [] = return []
+ findnew [] = return ([], noop)
findnew pending@(exemplar:_) = do
- (!newfiles, cleanup) <- liftAnnex $
+ (newfiles, cleanup) <- liftAnnex $
inRepo (Git.LsFiles.notInRepo False $ map changeFile pending)
- void $ liftIO cleanup
-- note: timestamp info is lost here
let ts = changeTime exemplar
- return $ map (PendingAddChange ts) newfiles
+ return (map (PendingAddChange ts) newfiles, void $ liftIO $ cleanup)
returnWhen c a
| c = return otherchanges
diff --git a/debian/changelog b/debian/changelog
index 929242629..d99795cb7 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -17,6 +17,8 @@ git-annex (4.20130724) UNRELEASED; urgency=low
transferred.
* assistant: Fix NetWatcher to not sync with remotes that have
remote.<name>.annex-sync set to false.
+ * assistant: Fix deadlock that could occur when adding a lot of files
+ at once in indirect mode.
-- Joey Hess <joeyh@debian.org> Tue, 23 Jul 2013 12:39:48 -0400