From 3483595622432eec1df905b24faa0f3f48d507de Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 20 Feb 2017 16:37:04 -0400 Subject: 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 --- Git/Status.hs | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) (limited to 'Git') 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 + ] -- cgit v1.2.3