aboutsummaryrefslogtreecommitdiffstats
path: root/app/History/Scramble.hs
diff options
context:
space:
mode:
authorLibravatar Alexander Foremny <aforemny@posteo.de>2024-03-25 14:57:48 +0100
committerLibravatar Alexander Foremny <aforemny@posteo.de>2024-03-25 14:59:41 +0100
commitf70a60b85019766ee0a1cb61fa06c342b48f5172 (patch)
treeee834fe6cab041842ab784fb9031bc2772b1c277 /app/History/Scramble.hs
parent4221ec60341d5d9e282d9a5e14ae19c132e5cf41 (diff)
fix: fix first scramble having to scan all files
Diffstat (limited to 'app/History/Scramble.hs')
-rw-r--r--app/History/Scramble.hs13
1 files changed, 1 insertions, 12 deletions
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 $