@@ -32,7 +32,7 @@
32-- > % cabal exec runhaskell Example.hs
32-- > % cabal exec runhaskell Example.hs
33-- > Example.hs: [panic master@2ae047ba5e4a6f0f3e705a43615363ac006099c1 (Mon Jan 11 11:50:59 2016 -0800) (14 commits in HEAD) (uncommitted files present)] oh no!
33-- > Example.hs: [panic master@2ae047ba5e4a6f0f3e705a43615363ac006099c1 (Mon Jan 11 11:50:59 2016 -0800) (14 commits in HEAD) (uncommitted files present)] oh no!
35−module Development.GitRev (gitHash, gitBranch, gitDirty, gitCommitCount, gitCommitDate) where
35+module Development.GitRev (gitHash, gitBranch, gitDirty, gitDirtyTracked, gitCommitCount, gitCommitDate) where
37import Control.Exception
37import Control.Exception
38import Control.Monad
38import Control.Monad
@@ -136,6 +136,15 @@ gitDirty = do
136 "" -> conE falseName
136 "" -> conE falseName
137 _ -> conE trueName
137 _ -> conE trueName
139+-- | Return @True@ if there are non-commited changes to tracked files
140+-- present in the repository
141+gitDirtyTracked :: ExpQ
143+ output <- runGit ["status", "--porcelain","--untracked-files=no"] "" IdxUsed
145+ "" -> conE falseName
139-- | Return the number of commits in the current head
148-- | Return the number of commits in the current head
140gitCommitCount :: ExpQ
149gitCommitCount :: ExpQ
141gitCommitCount =
150gitCommitCount =