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