This commit is contained in:
Joey Hess 2011-09-25 14:37:13 -04:00
parent b57a4566d3
commit 7724f895a8

View file

@ -23,13 +23,16 @@ inRepo :: Repo -> [FilePath] -> IO [FilePath]
inRepo repo l = pipeNullSplit repo $
Params "ls-files --cached -z --" : map File l
{- Scans for files at the specified locations that are not checked into
- git. -}
{- Scans for files at the specified locations that are not checked into git. -}
notInRepo :: Repo -> Bool -> [FilePath] -> IO [FilePath]
notInRepo repo include_ignored l =
pipeNullSplit repo $ [Params "ls-files --others"]++exclude++[Params "-z --"] ++ map File l
pipeNullSplit repo $
[Params "ls-files --others"] ++ exclude ++
[Params "-z --"] ++ map File l
where
exclude = if include_ignored then [] else [Param "--exclude-standard"]
exclude
| include_ignored = []
| otherwise = [Param "--exclude-standard"]
{- Returns a list of all files that are staged for commit. -}
staged :: Repo -> [FilePath] -> IO [FilePath]