diff options
author | 2011-06-29 11:42:00 -0400 | |
---|---|---|
committer | 2011-06-29 11:42:00 -0400 | |
commit | b3aaf980e460c2287fc1ef2b262685b1879e6ed0 (patch) | |
tree | f7f02ff6350cbf7f4470c696b5a6366c88350fa5 /GitRepo.hs | |
parent | fb7663ceb86b309dd223ebc113c8b586955a0e03 (diff) |
--force will cause add, etc, to operate on ignored files.
Diffstat (limited to 'GitRepo.hs')
-rw-r--r-- | GitRepo.hs | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/GitRepo.hs b/GitRepo.hs index 9f4a38a5f..844917b88 100644 --- a/GitRepo.hs +++ b/GitRepo.hs @@ -382,13 +382,15 @@ reap = do {- Scans for files that are checked into git at the specified locations. -} inRepo :: Repo -> [FilePath] -> IO [FilePath] inRepo repo l = pipeNullSplit repo $ - [Params "ls-files --cached --exclude-standard -z --"] ++ map File l + [Params "ls-files --cached -z --"] ++ map File l -{- Scans for files at the specified locations that are not checked into git, - - and not gitignored. -} -notInRepo :: Repo -> [FilePath] -> IO [FilePath] -notInRepo repo l = pipeNullSplit repo $ - [Params "ls-files --others --exclude-standard -z --"] ++ map File l +{- 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 + where + exclude = if include_ignored then [] else [Param "--exclude-standard"] {- Returns a list of all files that are staged for commit. -} stagedFiles :: Repo -> [FilePath] -> IO [FilePath] |