aboutsummaryrefslogtreecommitdiffstats
path: root/app/Git.hs
diff options
context:
space:
mode:
Diffstat (limited to 'app/Git.hs')
-rw-r--r--app/Git.hs4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/Git.hs b/app/Git.hs
index 7891288..c72edea 100644
--- a/app/Git.hs
+++ b/app/Git.hs
@@ -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")