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
This commit is contained in:
parent
a53daff32c
commit
75a15e1ad7
4 changed files with 39 additions and 14 deletions
|
@ -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
|
||||
]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue