diff options
author | Alexander Foremny <aforemny@posteo.de> | 2024-03-14 07:10:03 +0100 |
---|---|---|
committer | Alexander Foremny <aforemny@posteo.de> | 2024-03-14 07:10:03 +0100 |
commit | 11284c7c12c44e12de1cfc712c0391d5ee32a9f2 (patch) | |
tree | 553a527ff19f5ef105cbc2f026284e75fa5900db /app/Git/CommitHash.hs | |
parent | c8ab97e77c8ab56b9835d9f260dc222a10e9b3c6 (diff) | |
parent | 09e26c37de7e7227d856ffe15c9554af36b50c58 (diff) |
Merge remote-tracking branch 'origin/feature/review'main
Diffstat (limited to 'app/Git/CommitHash.hs')
-rw-r--r-- | app/Git/CommitHash.hs | 5 |
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 |