diff options
Diffstat (limited to 'app/Git.hs')
-rw-r--r-- | app/Git.hs | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -1,6 +1,7 @@ module Git ( withWorkingTree, getCommitHashes, + getRootDir, ) where @@ -22,3 +23,6 @@ withWorkingTree path hash action = do getCommitHashes :: IO [T.Text] getCommitHashes = T.lines . T.decodeUtf8 . LB8.toStrict <$> sh "git log --format=%H" + +getRootDir :: IO FilePath +getRootDir = T.unpack . T.decodeUtf8 . LB8.toStrict <$> sh (proc "git rev-parse --show-toplevel") |