use new getConfig

This commit is contained in:
Joey Hess 2012-03-22 00:23:15 -04:00
parent 4eb5112681
commit f1398b5583
8 changed files with 16 additions and 21 deletions

View file

@ -47,7 +47,7 @@ getUUID = getRepoUUID =<< gitRepo
{- Looks up a repo's UUID, caching it in .git/config if it's not already. -}
getRepoUUID :: Git.Repo -> Annex UUID
getRepoUUID r = do
c <- fromRepo cached
c <- toUUID <$> getConfig cachekey ""
let u = getUncachedUUID r
if c /= u && u /= NoUUID
@ -56,7 +56,6 @@ getRepoUUID r = do
return u
else return c
where
cached = toUUID . Git.Config.get cachekey ""
updatecache u = do
g <- gitRepo
when (g /= r) $ storeUUID cachekey u