diff options
Diffstat (limited to 'app')
-rw-r--r-- | app/Backend.hs | 3 |
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 |