split out three modules from Git
Constructors and configuration make sense in separate modules. A separate Git.Types is needed to avoid cycles.
This commit is contained in:
parent
46588674b0
commit
13fff71f20
20 changed files with 349 additions and 285 deletions
|
@ -21,6 +21,7 @@ module Annex.UUID (
|
|||
|
||||
import Common.Annex
|
||||
import qualified Git
|
||||
import qualified Git.Config
|
||||
import qualified Build.SysConfig as SysConfig
|
||||
import Config
|
||||
|
||||
|
@ -55,14 +56,14 @@ getRepoUUID r = do
|
|||
return u
|
||||
else return c
|
||||
where
|
||||
cached = toUUID . Git.configGet cachekey ""
|
||||
cached = toUUID . Git.Config.get cachekey ""
|
||||
updatecache u = do
|
||||
g <- gitRepo
|
||||
when (g /= r) $ storeUUID cachekey u
|
||||
cachekey = remoteConfig r "uuid"
|
||||
|
||||
getUncachedUUID :: Git.Repo -> UUID
|
||||
getUncachedUUID = toUUID . Git.configGet configkey ""
|
||||
getUncachedUUID = toUUID . Git.Config.get configkey ""
|
||||
|
||||
{- Make sure that the repo has an annex.uuid setting. -}
|
||||
prepUUID :: Annex ()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue