@@ -28,7 +28,7 @@
2828-- > % cabal exec runhaskell Example.hs
2929-- > Example.hs: [panic master@2702e69355c978805064543489c351b61ac6760b (6 commits in HEAD) (uncommitted files present)] oh no!
3030
31−module Development.GitRev (gitHash, gitBranch, gitDirty, gitCommitCount) where
31+module Development.GitRev (gitHash, gitBranch, gitDirty, gitCommitCount, gitCommitDate) where
3232
3333import Control.Applicative
3434import Control.Exception
@@ -110,3 +110,8 @@ gitDirty = do
110110gitCommitCount :: ExpQ
111111gitCommitCount =
112112 stringE =<< runGit ["rev-list", "HEAD", "--count"] "UNKNOWN"
113+
114+-- | Return the commit date of the current head
115+gitCommitDate :: ExpQ
116+gitCommitDate =
117+ stringE =<< runGit ["log", "HEAD", "-1", "--format=%cd"] "UNKNOWN"