From 22fd4b079dcf02a72fbd26c9d6733b5ec250ea53 Mon Sep 17 00:00:00 2001 From: Alexander Foremny Date: Tue, 26 Mar 2024 07:10:05 +0100 Subject: fix: fix log Previously, we tracked re-opening of issues by advancing the commit hash for scrambles that do not witness an issue. Advancing the commit hash for scrambles not witnessing an issue is obviously incorrect. To see that, consider a top/earlier commit that creates a new file with an issue in it. None of the bottom/later scrambles witness the issue. Hence, it would have been logged as being created in the bottom-most/latest commit instead of the top-most/earliest commit. --- app/History/Scramble.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'app/History/Scramble.hs') diff --git a/app/History/Scramble.hs b/app/History/Scramble.hs index ca4f4f8..017523a 100644 --- a/app/History/Scramble.hs +++ b/app/History/Scramble.hs @@ -1,6 +1,6 @@ module History.Scramble ( Scramble (..), - getScramble, + getScrambleOf, getIssuesOfFile, fromComment, ) @@ -35,8 +35,8 @@ data Scramble = Scramble } deriving (Show, Binary, Generic) -getScramble :: Backend.CommitHash -> IO Scramble -getScramble commitHash = do +getScrambleOf :: Backend.CommitHash -> IO Scramble +getScrambleOf commitHash = do filesChanged <- Backend.getChangedFilesOf commitHash issues <- concat <$> mapM (getIssuesOfFile commitHash) filesChanged pure $ -- cgit v1.2.3