summaryrefslogtreecommitdiff
path: root/Git/LsFiles.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Git/LsFiles.hs')
-rw-r--r--Git/LsFiles.hs6
1 files changed, 6 insertions, 0 deletions
diff --git a/Git/LsFiles.hs b/Git/LsFiles.hs
index 45c830cd6..45e105a3b 100644
--- a/Git/LsFiles.hs
+++ b/Git/LsFiles.hs
@@ -69,6 +69,12 @@ stagedDetails l repo = do
where
(metadata, file) = separate (== '\t') s
+{- Returns a list of files that have unstaged changes. -}
+changedUnstaged :: [FilePath] -> Repo -> IO ([FilePath], IO Bool)
+changedUnstaged l = pipeNullSplit params
+ where
+ params = Params "diff --name-only -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)