summaryrefslogtreecommitdiff
path: root/Assistant/Threads/Committer.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Assistant/Threads/Committer.hs')
-rw-r--r--Assistant/Threads/Committer.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/Assistant/Threads/Committer.hs b/Assistant/Threads/Committer.hs
index 6b036d09a..7c34f7a93 100644
--- a/Assistant/Threads/Committer.hs
+++ b/Assistant/Threads/Committer.hs
@@ -173,12 +173,12 @@ handleAdds delayadd st changechan transferqueue dstatus cs = returnWhen (null in
(incomplete, otherchanges) = partition (\c -> isPendingAddChange c || isInProcessAddChange c) cs
findnew [] = return []
- findnew pending = do
+ findnew pending@(exemplar:_) = do
(!newfiles, cleanup) <- runThreadState st $
inRepo (Git.LsFiles.notInRepo False $ map changeFile pending)
void cleanup
-- note: timestamp info is lost here
- let ts = changeTime (pending !! 0)
+ let ts = changeTime exemplar
return $ map (PendingAddChange ts) newfiles
returnWhen c a