sync, pre-commit, indirect: Avoid unnecessarily catting non-symlink files from git, which can be so large it runs out of memory.
This commit is contained in:
parent
66b6a9cc4e
commit
eb42bde19a
6 changed files with 26 additions and 14 deletions
|
@ -18,6 +18,7 @@ module Logs.Web (
|
|||
) where
|
||||
|
||||
import qualified Data.ByteString.Lazy.Char8 as L
|
||||
import Data.Tuple.Utils
|
||||
|
||||
import Common.Annex
|
||||
import Logs
|
||||
|
@ -70,7 +71,7 @@ knownUrls = do
|
|||
Annex.Branch.withIndex $ do
|
||||
top <- fromRepo Git.repoPath
|
||||
(l, cleanup) <- inRepo $ Git.LsFiles.stagedDetails [top]
|
||||
r <- mapM (geturls . snd) $ filter (isUrlLog . fst) l
|
||||
r <- mapM (geturls . snd3) $ filter (isUrlLog . fst3) l
|
||||
void $ liftIO cleanup
|
||||
return $ concat r
|
||||
where
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue