aboutsummaryrefslogtreecommitdiff
path: root/Command
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2017-01-31 19:07:24 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2017-01-31 19:09:37 -0400
commit7b1f48cbd5d78877ae3a6b6a5415a9bed6df79b2 (patch)
tree8cca3811dc181a57682eda1233a03c3433ee1b9e /Command
parent7fd21be7f967bdc21530b730f595379b23fe1174 (diff)
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.
Diffstat (limited to 'Command')
-rw-r--r--Command/Unused.hs4
1 files changed, 1 insertions, 3 deletions
diff --git a/Command/Unused.hs b/Command/Unused.hs
index 3953f4486..916e6db25 100644
--- a/Command/Unused.hs
+++ b/Command/Unused.hs
@@ -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]