aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorLibravatar Alexander Foremny <aforemny@posteo.de>2024-03-26 05:25:20 +0100
committerLibravatar Alexander Foremny <aforemny@posteo.de>2024-03-26 07:14:05 +0100
commit6c18592331d000ebc17335b0c66056539de1d74d (patch)
tree34474be920c1cb1246ad4733cde52e92a33142a6 /app
parent86057a512cd65ef73490acc3e0576a8c0a65ee49 (diff)
chore: add working tree changes to smoke tests
Diffstat (limited to 'app')
-rw-r--r--app/Backend.hs3
1 files changed, 2 insertions, 1 deletions
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