From f70a60b85019766ee0a1cb61fa06c342b48f5172 Mon Sep 17 00:00:00 2001 From: Alexander Foremny Date: Mon, 25 Mar 2024 14:57:48 +0100 Subject: fix: fix first scramble having to scan all files --- app/History/Scramble.hs | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) (limited to 'app/History/Scramble.hs') diff --git a/app/History/Scramble.hs b/app/History/Scramble.hs index 093db98..ca4f4f8 100644 --- a/app/History/Scramble.hs +++ b/app/History/Scramble.hs @@ -36,18 +36,7 @@ data Scramble = Scramble deriving (Show, Binary, Generic) getScramble :: Backend.CommitHash -> IO Scramble -getScramble commitHash@Backend.WorkingTree = do - filesChanged <- Backend.getFilesOf commitHash - issues <- concat <$> mapM (getIssuesOfFile commitHash) filesChanged - pure $ - Scramble - { issues = - M.unions - [ M.singleton issue.id issue | issue <- issues - ], - .. - } -getScramble commitHash@(Backend.Commit _) = do +getScramble commitHash = do filesChanged <- Backend.getChangedFilesOf commitHash issues <- concat <$> mapM (getIssuesOfFile commitHash) filesChanged pure $ -- cgit v1.2.3