From e0b7012ccc405dedb556b8c940eb66e42304bc73 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 27 Apr 2012 12:21:38 -0400 Subject: uninit: Clear annex.uuid from .git/config. Closes: #670639 --- Annex/UUID.hs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'Annex/UUID.hs') 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 "" -- cgit v1.2.3