diff options
author | Fabian Kirchner <kirchner@posteo.de> | 2023-10-14 18:42:17 +0200 |
---|---|---|
committer | Fabian Kirchner <kirchner@posteo.de> | 2023-10-14 18:42:17 +0200 |
commit | a9c0b62b158a304f6f663832ebb7179972231502 (patch) | |
tree | 3b4f6b454d8cacd2e4b440ec64a77e824cc46daf /app/History.hs | |
parent | 3810eecbbe7b2c78eaaed28046cd18896e6b8849 (diff) |
add suffixes to cache ids
Diffstat (limited to 'app/History.hs')
-rw-r--r-- | app/History.hs | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/app/History.hs b/app/History.hs index 3a81fa3..c5953b6 100644 --- a/app/History.hs +++ b/app/History.hs @@ -12,7 +12,7 @@ import Data.Function ((&)) import Data.List (foldl', intercalate) import Data.Maybe (catMaybes, mapMaybe) import Data.String (fromString) -import Data.Text (Text, lines, unpack) +import Data.Text (Text, append, lines, pack, unpack) import Data.Text.Encoding (decodeUtf8) import GHC.Generics (Generic) import Issue (Issue (..), fromMatch, id) @@ -37,10 +37,8 @@ listIssues filters paths = do [] -> pure [] hashFirst : hashesRest -> do - -- TODO Append ".all" to cache id - issuesInitial <- cached hashFirst (\_ -> getIssuesCommitAll hashFirst) - -- TODO Append ".changed" to cache id - commitInfos <- mapM (\hash -> cached hash (\_ -> getCommitInfo hash)) hashesRest + issuesInitial <- cached (append hashFirst (pack ".all")) (\_ -> getIssuesCommitAll hashFirst) + commitInfos <- mapM (\hash -> cached (append hash (pack ".changed")) (\_ -> getCommitInfo hash)) hashesRest -- TODO We also have to get the issues which changed in the working tree let eventses = getEvents hashFirst issuesInitial commitInfos let issues = mapMaybe issueFromIssueEvents eventses |