[#142] Implement prettier 'hit log' command (#143)

Resolves #142
This commit is contained in:
Dmitrii Kovanikov 2020-02-10 08:47:22 +00:00 committed by GitHub
parent 271ff33ce0
commit fdc18f025b

View File

@ -1,13 +1,19 @@
-- | Everything related to the `hit log` command
{- | Pretty @hit log@ command which outputs short, pretty and
informative commit log.
-}
module Hit.Git.Log
( runLog
) where
import Shellmet()
import Shellmet ()
-- | @hit log@ command.
runLog :: Maybe Text -> IO ()
runLog (fromMaybe "HEAD" -> commit)
= "git" ["log", "--oneline", "--decorate", commit]
runLog (fromMaybe "HEAD" -> commit) = "git"
[ "log"
, "--format=format: ❃ %C(bold blue)%h%C(reset): %C(green)%s%C(reset)%n %C(bold)Author%C(reset): %an <%ae>%n %C(bold)Date%C(reset): %cd%n"
, "--date=rfc"
, commit
]