summaryrefslogtreecommitdiff
path: root/UUID.hs
diff options
context:
space:
mode:
Diffstat (limited to 'UUID.hs')
-rw-r--r--UUID.hs10
1 files changed, 7 insertions, 3 deletions
diff --git a/UUID.hs b/UUID.hs
index a654424b4..6c719b41e 100644
--- a/UUID.hs
+++ b/UUID.hs
@@ -11,13 +11,15 @@
module UUID (
UUID,
getUUID,
+ getUncachedUUID,
prepUUID,
genUUID,
reposByUUID,
reposWithoutUUID,
prettyPrintUUIDs,
describeUUID,
- uuidLog
+ uuidLog,
+ uuidMap
) where
import Control.Monad.State
@@ -60,7 +62,7 @@ getUUID r = do
g <- Annex.gitRepo
let c = cached g
- let u = uncached
+ let u = getUncachedUUID r
if c /= u && u /= ""
then do
@@ -68,11 +70,13 @@ getUUID r = do
return u
else return c
where
- uncached = Git.configGet r "annex.uuid" ""
cached g = Git.configGet g cachekey ""
updatecache g u = when (g /= r) $ Annex.setConfig cachekey u
cachekey = "remote." ++ Git.repoRemoteName r ++ ".annex-uuid"
+getUncachedUUID :: Git.Repo -> UUID
+getUncachedUUID r = Git.configGet r "annex.uuid" ""
+
{- Make sure that the repo has an annex.uuid setting. -}
prepUUID :: Annex ()
prepUUID = do