summaryrefslogtreecommitdiff
path: root/Git
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2017-02-20 16:37:04 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2017-02-20 17:01:24 -0400
commit3483595622432eec1df905b24faa0f3f48d507de (patch)
treeac96b72d1f3998fe715e045109adb0fce671b735 /Git
parentc8a5b1a658f23ae882ee0fb2d975eb7281e9c022 (diff)
status: Pass --ignore-submodules=when option on to git status.
Didn't make --ignore-submodules without a value be handled because I can't see a way to make optparse-applicative parse that. I've opened a bug requesting a way to do that: https://github.com/pcapriotti/optparse-applicative/issues/243
Diffstat (limited to 'Git')
-rw-r--r--Git/Status.hs17
1 files changed, 9 insertions, 8 deletions
diff --git a/Git/Status.hs b/Git/Status.hs
index 4f9ad0265..778e65248 100644
--- a/Git/Status.hs
+++ b/Git/Status.hs
@@ -64,13 +64,14 @@ parseStatusZ = go []
cparse '?' = Just Untracked
cparse _ = Nothing
-getStatus :: [FilePath] -> Repo -> IO ([Status], IO Bool)
-getStatus l r = do
- (ls, cleanup) <- pipeNullSplit params r
+getStatus :: [CommandParam] -> [FilePath] -> Repo -> IO ([Status], IO Bool)
+getStatus ps fs r = do
+ (ls, cleanup) <- pipeNullSplit ps' r
return (parseStatusZ ls, cleanup)
where
- params =
- [ Param "status"
- , Param "-uall"
- , Param "-z"
- ] ++ map File l
+ ps' = concat
+ [ [Param "status"]
+ , ps
+ , [ Param "-uall" , Param "-z"]
+ , map File fs
+ ]