aboutsummaryrefslogtreecommitdiffstats
path: root/app/Git
diff options
context:
space:
mode:
Diffstat (limited to 'app/Git')
-rw-r--r--app/Git/CommitHash.hs5
1 files changed, 5 insertions, 0 deletions
diff --git a/app/Git/CommitHash.hs b/app/Git/CommitHash.hs
index db7a478..0caecf4 100644
--- a/app/Git/CommitHash.hs
+++ b/app/Git/CommitHash.hs
@@ -2,6 +2,7 @@ module Git.CommitHash
( CommitHash (..),
toShortText,
toText,
+ toTextUnsafe,
)
where
@@ -23,6 +24,10 @@ toText :: CommitHash -> Maybe T.Text
toText WorkingTree = Nothing
toText (Commit hash) = Just hash
+toTextUnsafe :: CommitHash -> T.Text
+toTextUnsafe (Commit hash) = hash
+toTextUnsafe _ = error "toTextUnsafe: WorkingDir"
+
instance P.Render CommitHash where
render = P.render . P.Detailed