summaryrefslogtreecommitdiff
path: root/Annex/UUID.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Annex/UUID.hs')
-rw-r--r--Annex/UUID.hs8
1 files changed, 7 insertions, 1 deletions
diff --git a/Annex/UUID.hs b/Annex/UUID.hs
index e8306de90..5459cc7fe 100644
--- a/Annex/UUID.hs
+++ b/Annex/UUID.hs
@@ -16,12 +16,14 @@ module Annex.UUID (
getRepoUUID,
getUncachedUUID,
prepUUID,
- genUUID
+ genUUID,
+ removeRepoUUID,
) where
import Common.Annex
import qualified Git
import qualified Git.Config
+import qualified Git.Command
import qualified Build.SysConfig as SysConfig
import Config
@@ -61,6 +63,10 @@ getRepoUUID r = do
when (g /= r) $ storeUUID cachekey u
cachekey = remoteConfig r "uuid"
+removeRepoUUID :: Annex ()
+removeRepoUUID = inRepo $ Git.Command.run "config"
+ [Param "--unset", Param configkey]
+
getUncachedUUID :: Git.Repo -> UUID
getUncachedUUID = toUUID . Git.Config.get configkey ""