add notStaged
This commit is contained in:
parent
e8a74e9493
commit
b0c5cbfde2
1 changed files with 9 additions and 0 deletions
|
@ -10,6 +10,7 @@ module Git.LsFiles (
|
||||||
notInRepo,
|
notInRepo,
|
||||||
staged,
|
staged,
|
||||||
stagedNotDeleted,
|
stagedNotDeleted,
|
||||||
|
notStaged,
|
||||||
typeChanged,
|
typeChanged,
|
||||||
typeChangedStaged,
|
typeChangedStaged,
|
||||||
Conflicting(..),
|
Conflicting(..),
|
||||||
|
@ -52,6 +53,14 @@ staged' ps l = pipeNullSplit $ prefix ++ ps ++ suffix
|
||||||
prefix = [Params "diff --cached --name-only -z"]
|
prefix = [Params "diff --cached --name-only -z"]
|
||||||
suffix = Param "--" : map File l
|
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
|
{- Returns a list of the files in the specified locations that are staged
|
||||||
- for commit, and whose type has changed. -}
|
- for commit, and whose type has changed. -}
|
||||||
typeChangedStaged :: [FilePath] -> Repo -> IO ([FilePath], IO Bool)
|
typeChangedStaged :: [FilePath] -> Repo -> IO ([FilePath], IO Bool)
|
||||||
|
|
Loading…
Add table
Reference in a new issue