summaryrefslogtreecommitdiff
path: root/Git
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2013-02-20 14:12:55 -0400
committerGravatar Joey Hess <joey@kitenet.net>2013-02-20 14:12:55 -0400
commitb2a46e18236e7cc8ff864bc4fed3b190efb161e5 (patch)
tree401e26f43c812ad30e9d5aa376c219f485bf2f24 /Git
parent27c02b4732c8087ba7d123f49ea2c10c7366cd4a (diff)
make adding modified files work on crippled filesystems
Diffstat (limited to 'Git')
-rw-r--r--Git/LsFiles.hs8
1 files changed, 8 insertions, 0 deletions
diff --git a/Git/LsFiles.hs b/Git/LsFiles.hs
index 401ed5562..ca08fe261 100644
--- a/Git/LsFiles.hs
+++ b/Git/LsFiles.hs
@@ -9,6 +9,7 @@ module Git.LsFiles (
inRepo,
notInRepo,
deleted,
+ modified,
staged,
stagedNotDeleted,
stagedDetails,
@@ -46,6 +47,13 @@ deleted l repo = pipeNullSplit params repo
where
params = [Params "ls-files --deleted -z --"] ++ map File l
+{- Returns a list of files in the specified locations that have been
+ - modified. -}
+modified :: [FilePath] -> Repo -> IO ([FilePath], IO Bool)
+modified l repo = pipeNullSplit params repo
+ where
+ params = [Params "ls-files --modified -z --"] ++ map File l
+
{- Returns a list of all files that are staged for commit. -}
staged :: [FilePath] -> Repo -> IO ([FilePath], IO Bool)
staged = staged' []