diff options
author | Joey Hess <joey@kitenet.net> | 2012-04-27 12:21:38 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2012-04-27 12:21:38 -0400 |
commit | e0b7012ccc405dedb556b8c940eb66e42304bc73 (patch) | |
tree | 6a7093d721d4e1ad4933a1255e057c7df5189135 /Annex/UUID.hs | |
parent | a2ee4386bb8f64046a5838038c89492dddcce94f (diff) |
uninit: Clear annex.uuid from .git/config. Closes: #670639
Diffstat (limited to 'Annex/UUID.hs')
-rw-r--r-- | Annex/UUID.hs | 8 |
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 "" |