@@ -29,7 +29,14 @@
2929-- > % cabal exec runhaskell Example.hs
3030-- > Example.hs: [panic master@2ae047ba5e4a6f0f3e705a43615363ac006099c1 (Mon Jan 11 11:50:59 2016 -0800) (14 commits in HEAD) (uncommitted files present)] oh no!
3131
32−module Development.GitRev (gitHash, gitBranch, gitDirty, gitCommitCount, gitCommitDate) where
32+module Development.GitRev
33+ ( gitBranch
34+ , gitCommitCount
35+ , gitCommitDate
36+ , gitDescribe
37+ , gitDirty
38+ , gitHash
39+ ) where
3340
3441import Control.Applicative
3542import Control.Exception
@@ -103,6 +110,12 @@ gitBranch :: ExpQ
103110gitBranch =
104111 stringE =<< runGit ["rev-parse", "--abbrev-ref", "HEAD"] "UNKNOWN" IdxNotUsed
105112
113+-- | Return the long git description for the current git commit, or @UNKNOWN@
114+-- it not in a git repository.
115+gitDescribe :: ExpQ
116+gitDescribe =
117+ stringE =<< runGit ["describe", "--long", "--always"] "UNKNOWN" IdxNotUsed
118+
106119-- | Return @True@ if there are non-committed files present in the
107120-- repository
108121gitDirty :: ExpQ