move, copy: Sped up seeking for annexed files to operate on by a factor of nearly 2x.

This commit is contained in:
Joey Hess 2020-07-24 12:56:02 -04:00
parent 00865cdae8
commit d732ef1a89
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
5 changed files with 37 additions and 30 deletions

View file

@ -57,8 +57,11 @@ seek o = startConcurrency commandStages $ do
seeker = AnnexedFileSeeker
{ startAction = start o
, checkContentPresent = Nothing
, usesLocationLog = False
, checkContentPresent = case fromToOptions o of
Right (FromRemote _) -> Just False
Right (ToRemote _) -> Just True
Left ToHere -> Just False
, usesLocationLog = True
}
{- A copy is just a move that does not delete the source file.