remove dead code
flags no longer used anywhere
This commit is contained in:
parent
543993b068
commit
6984bcdba9
1 changed files with 0 additions and 13 deletions
13
Annex.hs
13
Annex.hs
|
@ -19,10 +19,8 @@ module Annex (
|
||||||
getState,
|
getState,
|
||||||
changeState,
|
changeState,
|
||||||
withState,
|
withState,
|
||||||
setFlag,
|
|
||||||
setField,
|
setField,
|
||||||
setOutput,
|
setOutput,
|
||||||
getFlag,
|
|
||||||
getField,
|
getField,
|
||||||
addCleanupAction,
|
addCleanupAction,
|
||||||
gitRepo,
|
gitRepo,
|
||||||
|
@ -189,7 +187,6 @@ data AnnexState = AnnexState
|
||||||
, trustmap :: Maybe TrustMap
|
, trustmap :: Maybe TrustMap
|
||||||
, groupmap :: Maybe GroupMap
|
, groupmap :: Maybe GroupMap
|
||||||
, lockcache :: LockCache
|
, lockcache :: LockCache
|
||||||
, flags :: M.Map String Bool
|
|
||||||
, fields :: M.Map String String
|
, fields :: M.Map String String
|
||||||
, cleanupactions :: M.Map CleanupAction (Annex ())
|
, cleanupactions :: M.Map CleanupAction (Annex ())
|
||||||
, sentinalstatus :: Maybe SentinalStatus
|
, sentinalstatus :: Maybe SentinalStatus
|
||||||
|
@ -245,7 +242,6 @@ newAnnexState c r = do
|
||||||
, trustmap = Nothing
|
, trustmap = Nothing
|
||||||
, groupmap = Nothing
|
, groupmap = Nothing
|
||||||
, lockcache = M.empty
|
, lockcache = M.empty
|
||||||
, flags = M.empty
|
|
||||||
, fields = M.empty
|
, fields = M.empty
|
||||||
, cleanupactions = M.empty
|
, cleanupactions = M.empty
|
||||||
, sentinalstatus = Nothing
|
, sentinalstatus = Nothing
|
||||||
|
@ -327,11 +323,6 @@ withState modifier = do
|
||||||
mvar <- fst <$> ask
|
mvar <- fst <$> ask
|
||||||
liftIO $ modifyMVar mvar modifier
|
liftIO $ modifyMVar mvar modifier
|
||||||
|
|
||||||
{- Sets a flag to True -}
|
|
||||||
setFlag :: String -> Annex ()
|
|
||||||
setFlag flag = changeState $ \st ->
|
|
||||||
st { flags = M.insert flag True $ flags st }
|
|
||||||
|
|
||||||
{- Sets a field to a value -}
|
{- Sets a field to a value -}
|
||||||
setField :: String -> String -> Annex ()
|
setField :: String -> String -> Annex ()
|
||||||
setField field value = changeState $ \st ->
|
setField field value = changeState $ \st ->
|
||||||
|
@ -348,10 +339,6 @@ setOutput o = changeState $ \st ->
|
||||||
let m = output st
|
let m = output st
|
||||||
in st { output = m { outputType = adjustOutputType (outputType m) o } }
|
in st { output = m { outputType = adjustOutputType (outputType m) o } }
|
||||||
|
|
||||||
{- Checks if a flag was set. -}
|
|
||||||
getFlag :: String -> Annex Bool
|
|
||||||
getFlag flag = fromMaybe False . M.lookup flag <$> getState flags
|
|
||||||
|
|
||||||
{- Gets the value of a field. -}
|
{- Gets the value of a field. -}
|
||||||
getField :: String -> Annex (Maybe String)
|
getField :: String -> Annex (Maybe String)
|
||||||
getField field = M.lookup field <$> getState fields
|
getField field = M.lookup field <$> getState fields
|
||||||
|
|
Loading…
Reference in a new issue