summaryrefslogtreecommitdiff
path: root/Git/LsFiles.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Git/LsFiles.hs')
-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]