summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2011-09-25 14:37:13 -0400
committerGravatar Joey Hess <joey@kitenet.net>2011-09-25 14:37:13 -0400
commit7724f895a810d5922fb0581403ff17169344f514 (patch)
treee45fa6343c09c77f765342dbcc0ac649af9a0d7c
parentb57a4566d3468f713ad369fc5f41778dfd133f0f (diff)
tweak
-rw-r--r--Git/LsFiles.hs11
1 files changed, 7 insertions, 4 deletions
diff --git a/Git/LsFiles.hs b/Git/LsFiles.hs
index 1ecbb029b..c778e5d69 100644
--- a/Git/LsFiles.hs
+++ b/Git/LsFiles.hs
@@ -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]