Commit 80d89e61460f5cdd6fb89f889d8e37c3c4451b80 Parent: 699060934c98e6e0429e268bb44cef1011243914 Author: mcol <mcol@posteo.net> Date: 2021-09-24 00:12:48 +0100 Committer: mcol <mcol@posteo.net> Committed: 2021-09-24 00:12:48 +0100 Neaten getTree function
src/Repositories.hs Modified
@@ -80,9 +80,7 @@ loadCommit _ = Nothing getTree :: CommitOid LgRepo -> ReaderT LgRepo IO [(TreeFilePath, TreeEntry LgRepo)] -getTree commitID = do - gitHead <- lookupCommit commitID - lookupTree (commitTree gitHead) >>= listTreeEntries +getTree commitID = lookupCommit commitID >>= lookupTree . commitTree >>= listTreeEntries getDescription :: FilePath -> IO Text getDescription path = fromRight "" <$> tryIOError (pack <$> readFile path)