diff options
Diffstat (limited to 'GitRepo.hs')
-rw-r--r-- | GitRepo.hs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/GitRepo.hs b/GitRepo.hs index 533038fc8..ec363fe73 100644 --- a/GitRepo.hs +++ b/GitRepo.hs @@ -38,6 +38,7 @@ module GitRepo ( inRepo, notInRepo, stagedFiles, + changedUnstagedFiles, checkAttr, decodeGitFile, encodeGitFile, @@ -249,6 +250,11 @@ stagedFiles repo l = pipeNullSplit repo $ ["diff", "--cached", "--name-only", "--diff-filter=ACMRT", "-z", "--"] ++ l +{- Returns a list of files that have unstaged changes. -} +changedUnstagedFiles :: Repo -> [FilePath] -> IO [FilePath] +changedUnstagedFiles repo l = pipeNullSplit repo $ + ["diff", "--name-only", "-z", "--"] ++ l + {- Returns a list of the files in the specified locations that are staged - for commit, and whose type has changed. -} typeChangedStagedFiles :: Repo -> [FilePath] -> IO [FilePath] |