refactor git-annex branch log filename code into central location
Having one module that knows about all the filenames used on the branch allows working back from an arbitrary filename to enough information about it to implement dropping dead remotes and doing other log file compacting as part of a forget transition.
This commit is contained in:
parent
6147652cc6
commit
62beaa1a86
12 changed files with 136 additions and 74 deletions
|
@ -21,16 +21,13 @@ import qualified Data.Set as S
|
|||
import Data.Time.Clock.POSIX
|
||||
|
||||
import Common.Annex
|
||||
import Logs
|
||||
import qualified Annex.Branch
|
||||
import qualified Annex
|
||||
import Logs.UUIDBased
|
||||
import Types.Group
|
||||
import Types.StandardGroups
|
||||
|
||||
{- Filename of group.log. -}
|
||||
groupLog :: FilePath
|
||||
groupLog = "group.log"
|
||||
|
||||
{- Returns the groups of a given repo UUID. -}
|
||||
lookupGroups :: UUID -> Annex (S.Set Group)
|
||||
lookupGroups u = (fromMaybe S.empty . M.lookup u) . groupsByUUID <$> groupMap
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue