unused: When large files are checked right into git, avoid buffering their contents in memory.

This makes it a little bit slower since it has to check file size,
but worth it to fix a potential memory use problem.

This commit was sponsored by Fernando Jimenez on Patreon.
This commit is contained in:
Joey Hess 2017-01-31 19:07:24 -04:00
parent 9eb10caa27
commit 062286135c
No known key found for this signature in database
GPG key ID: C910D9222512E3C7
2 changed files with 3 additions and 3 deletions

View file

@ -25,7 +25,6 @@ import qualified Git.LsFiles as LsFiles
import qualified Git.DiffTree as DiffTree
import qualified Remote
import qualified Annex.Branch
import Annex.Link
import Annex.CatFile
import Annex.WorkTree
import Types.RefSpec
@ -272,8 +271,7 @@ withKeysReferencedDiff a getdiff extractsha = do
go d = do
let sha = extractsha d
unless (sha == nullSha) $
(parseLinkOrPointer <$> catObject sha)
>>= maybe noop a
catKey sha >>= maybe noop a
{- Filters out keys that have an associated file that's not modified. -}
associatedFilesFilter :: [Key] -> Annex [Key]