more efficient uuid to remote lookup

This commit is contained in:
Joey Hess 2013-04-02 16:39:11 -04:00
parent 7b6cf1981f
commit 47950cdf31

View file

@ -62,10 +62,8 @@ onAdd file = case parseTransferFile file of
go _ Nothing = noop -- transfer already finished
go t (Just info) = do
debug [ "transfer starting:", describeTransfer t info ]
r <- headMaybe . filter (sameuuid t)
<$> liftAnnex Remote.remoteList
r <- liftAnnex $ Remote.remoteFromUUID $ transferUUID t
updateTransferInfo t info { transferRemote = r }
sameuuid t r = Remote.uuid r == transferUUID t
{- Called when a transfer information file is updated.
-