@@ -29,7 +29,7 @@
29-- > % cabal exec runhaskell Example.hs
29-- > % cabal exec runhaskell Example.hs
30-- > Example.hs: [panic master@2ae047ba5e4a6f0f3e705a43615363ac006099c1 (Mon Jan 11 11:50:59 2016 -0800) (14 commits in HEAD) (uncommitted files present)] oh no!
30-- > Example.hs: [panic master@2ae047ba5e4a6f0f3e705a43615363ac006099c1 (Mon Jan 11 11:50:59 2016 -0800) (14 commits in HEAD) (uncommitted files present)] oh no!
32−module Development.GitRev (gitHash, gitBranch, gitDirty, gitCommitCount, gitCommitDate) where
32+module Development.GitRev (gitHash, gitBranch, gitDirty, gitDirtyTracked, gitCommitCount, gitCommitDate) where
34import Control.Applicative
34import Control.Applicative
35import Control.Exception
35import Control.Exception
@@ -112,6 +112,15 @@ gitDirty = do
112 "" -> conE falseName
112 "" -> conE falseName
113 _ -> conE trueName
113 _ -> conE trueName
115+-- | Return @True@ if there are non-commited changes to tracked files
116+-- present in the repository
117+gitDirtyTracked :: ExpQ
119+ output <- runGit ["status", "--porcelain","--untracked-files=no"] "" IdxUsed
121+ "" -> conE falseName
115-- | Return the number of commits in the current head
124-- | Return the number of commits in the current head
116gitCommitCount :: ExpQ
125gitCommitCount :: ExpQ
117gitCommitCount =
126gitCommitCount =