From 6c18592331d000ebc17335b0c66056539de1d74d Mon Sep 17 00:00:00 2001 From: Alexander Foremny Date: Tue, 26 Mar 2024 05:25:20 +0100 Subject: chore: add working tree changes to smoke tests --- app/Backend.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'app') diff --git a/app/Backend.hs b/app/Backend.hs index 0a61ce3..af6cebd 100644 --- a/app/Backend.hs +++ b/app/Backend.hs @@ -39,6 +39,7 @@ import Git.Libgit2 (LgRepo, lgFactory) import Patch qualified as A import Process (proc, sh, sh_) import Safe (headMay) +import System.Environment (lookupEnv) import Text.Printf (printf) getCommitHashes :: Maybe CommitHash -> Maybe CommitHash -> IO [CommitHash] @@ -166,7 +167,7 @@ data Author = Author getCommitOf :: CommitHash -> IO Commit getCommitOf commitHash@WorkingTree = do - date <- getCurrentTime + date <- maybe getCurrentTime (pure . read) =<< lookupEnv "FAKETIME" authorName <- sh "git config user.name" authorEmail <- sh "git config user.email" pure -- cgit v1.2.3