diff options
author | Alexander Foremny <aforemny@posteo.de> | 2023-10-23 10:08:49 +0200 |
---|---|---|
committer | Alexander Foremny <aforemny@posteo.de> | 2023-11-07 09:50:52 +0100 |
commit | 2e032a5210d5166a42797ee8f296ec4228d6d838 (patch) | |
tree | bb71d1b466581114ffd7613d950533ffc1298834 /app/Git.hs | |
parent | 1127c71fa5f5c5a3d6bfde818cb00eb26e9d4cb3 (diff) |
add `Git.getRootDir`
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") |