generalize quiet flag to output type
This will allow adding other styles of output.
This commit is contained in:
parent
55783d886d
commit
57dd34c6be
5 changed files with 13 additions and 12 deletions
7
Annex.hs
7
Annex.hs
|
@ -10,6 +10,7 @@
|
|||
module Annex (
|
||||
Annex,
|
||||
AnnexState(..),
|
||||
OutputType(..),
|
||||
new,
|
||||
run,
|
||||
eval,
|
||||
|
@ -48,7 +49,7 @@ data AnnexState = AnnexState
|
|||
, backends :: [Backend Annex]
|
||||
, remotes :: [Remote Annex]
|
||||
, repoqueue :: Queue
|
||||
, quiet :: Bool
|
||||
, output :: OutputType
|
||||
, force :: Bool
|
||||
, fast :: Bool
|
||||
, branchstate :: BranchState
|
||||
|
@ -63,13 +64,15 @@ data AnnexState = AnnexState
|
|||
, cipher :: Maybe Cipher
|
||||
}
|
||||
|
||||
data OutputType = NormalOutput | QuietOutput
|
||||
|
||||
newState :: Git.Repo -> AnnexState
|
||||
newState gitrepo = AnnexState
|
||||
{ repo = gitrepo
|
||||
, backends = []
|
||||
, remotes = []
|
||||
, repoqueue = empty
|
||||
, quiet = False
|
||||
, output = NormalOutput
|
||||
, force = False
|
||||
, fast = False
|
||||
, branchstate = startBranchState
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue