summaryrefslogtreecommitdiff
path: root/Git/LsFiles.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2011-12-20 14:37:53 -0400
committerGravatar Joey Hess <joey@kitenet.net>2011-12-20 14:37:53 -0400
commitee3b5b2a4279292d55af43c772cdfd0c56420798 (patch)
tree0227fb4732ef376ac9123a9a89b924793ed841e2 /Git/LsFiles.hs
parent6897460d350df41f1e98147f96fde1b66171bc19 (diff)
use Common in a few more modules
Diffstat (limited to 'Git/LsFiles.hs')
-rw-r--r--Git/LsFiles.hs14
1 files changed, 7 insertions, 7 deletions
diff --git a/Git/LsFiles.hs b/Git/LsFiles.hs
index 0c71ed884..0de86383d 100644
--- a/Git/LsFiles.hs
+++ b/Git/LsFiles.hs
@@ -15,9 +15,9 @@ module Git.LsFiles (
typeChangedStaged,
) where
+import Common
import Git
import Git.Command
-import Utility.SafeCommand
{- Scans for files that are checked into git at the specified locations. -}
inRepo :: [FilePath] -> Repo -> IO [FilePath]
@@ -43,10 +43,10 @@ stagedNotDeleted :: [FilePath] -> Repo -> IO [FilePath]
stagedNotDeleted = staged' [Param "--diff-filter=ACMRT"]
staged' :: [CommandParam] -> [FilePath] -> Repo -> IO [FilePath]
-staged' middle l = pipeNullSplit $ start ++ middle ++ end
+staged' ps l = pipeNullSplit $ prefix ++ ps ++ suffix
where
- start = [Params "diff --cached --name-only -z"]
- end = Param "--" : map File l
+ prefix = [Params "diff --cached --name-only -z"]
+ suffix = Param "--" : map File l
{- Returns a list of files that have unstaged changes. -}
changedUnstaged :: [FilePath] -> Repo -> IO [FilePath]
@@ -65,7 +65,7 @@ typeChanged :: [FilePath] -> Repo -> IO [FilePath]
typeChanged = typeChanged' []
typeChanged' :: [CommandParam] -> [FilePath] -> Repo -> IO [FilePath]
-typeChanged' middle l = pipeNullSplit $ start ++ middle ++ end
+typeChanged' ps l = pipeNullSplit $ prefix ++ ps ++ suffix
where
- start = [Params "diff --name-only --diff-filter=T -z"]
- end = Param "--" : map File l
+ prefix = [Params "diff --name-only --diff-filter=T -z"]
+ suffix = Param "--" : map File l