summaryrefslogtreecommitdiff
path: root/GitRepo.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2011-06-29 11:42:35 -0400
committerGravatar Joey Hess <joey@kitenet.net>2011-06-29 11:42:35 -0400
commitaf45d422248846869babdbc3eae2765d94ea9f20 (patch)
tree6f1bea8cc19dedcd8ca40c046718f7f96e7454f8 /GitRepo.hs
parent5034d8c2985dafeb141bba383ab70d75729b3cb6 (diff)
parentb3aaf980e460c2287fc1ef2b262685b1879e6ed0 (diff)
Merge branch 'master' into v3
Conflicts: debian/changelog
Diffstat (limited to 'GitRepo.hs')
-rw-r--r--GitRepo.hs14
1 files changed, 8 insertions, 6 deletions
diff --git a/GitRepo.hs b/GitRepo.hs
index 4a6c4d763..cfe949d5e 100644
--- a/GitRepo.hs
+++ b/GitRepo.hs
@@ -435,13 +435,15 @@ shaSize = 40
{- 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]