diff options
Diffstat (limited to 'Git/LsFiles.hs')
-rw-r--r-- | Git/LsFiles.hs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/Git/LsFiles.hs b/Git/LsFiles.hs index fce9d44f4..e264dee8b 100644 --- a/Git/LsFiles.hs +++ b/Git/LsFiles.hs @@ -10,6 +10,7 @@ module Git.LsFiles ( notInRepo, staged, stagedNotDeleted, + notStaged, typeChanged, typeChangedStaged, Conflicting(..), @@ -52,6 +53,14 @@ staged' ps l = pipeNullSplit $ prefix ++ ps ++ suffix prefix = [Params "diff --cached --name-only -z"] suffix = Param "--" : map File l +{- Returns a list of all files that have unstaged changes. This includes + - any new files, that have not been added yet. -} +notStaged :: [FilePath] -> Repo -> IO ([FilePath], IO Bool) +notStaged l repo = pipeNullSplit params repo + where + params = [Params "ls-files --others --deleted --modified --exclude-standard -z --"] ++ + map File l + {- Returns a list of the files in the specified locations that are staged - for commit, and whose type has changed. -} typeChangedStaged :: [FilePath] -> Repo -> IO ([FilePath], IO Bool) |