aboutsummaryrefslogtreecommitdiffstats
path: root/app/Git/CommitHash.hs
diff options
context:
space:
mode:
authorLibravatar Alexander Foremny <aforemny@posteo.de>2024-02-29 04:11:10 +0100
committerLibravatar Alexander Foremny <aforemny@posteo.de>2024-03-01 06:45:13 +0100
commit9a49ec0dcd6f75736949350844f85d80fe48a662 (patch)
treeb506bb61f4951207aa1aff04080fd3d7874927c3 /app/Git/CommitHash.hs
parent941f0d4ccb688d42c0438e05051ed78a410431b6 (diff)
wip: add `review` command
Prototype of the `review` command, cf. `anissue review -h`. Also adds the `status` command.
Diffstat (limited to 'app/Git/CommitHash.hs')
-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