uninit: Clear annex.uuid from .git/config. Closes: #670639

This commit is contained in:
Joey Hess 2012-04-27 12:21:38 -04:00
parent a2ee4386bb
commit e0b7012ccc
3 changed files with 11 additions and 2 deletions

View file

@ -16,12 +16,14 @@ module Annex.UUID (
getRepoUUID, getRepoUUID,
getUncachedUUID, getUncachedUUID,
prepUUID, prepUUID,
genUUID genUUID,
removeRepoUUID,
) where ) where
import Common.Annex import Common.Annex
import qualified Git import qualified Git
import qualified Git.Config import qualified Git.Config
import qualified Git.Command
import qualified Build.SysConfig as SysConfig import qualified Build.SysConfig as SysConfig
import Config import Config
@ -61,6 +63,10 @@ getRepoUUID r = do
when (g /= r) $ storeUUID cachekey u when (g /= r) $ storeUUID cachekey u
cachekey = remoteConfig r "uuid" cachekey = remoteConfig r "uuid"
removeRepoUUID :: Annex ()
removeRepoUUID = inRepo $ Git.Command.run "config"
[Param "--unset", Param configkey]
getUncachedUUID :: Git.Repo -> UUID getUncachedUUID :: Git.Repo -> UUID
getUncachedUUID = toUUID . Git.Config.get configkey "" getUncachedUUID = toUUID . Git.Config.get configkey ""

View file

@ -29,7 +29,9 @@ initialize mdescription = do
maybe (recordUUID u) (describeUUID u) mdescription maybe (recordUUID u) (describeUUID u) mdescription
uninitialize :: Annex () uninitialize :: Annex ()
uninitialize = gitPreCommitHookUnWrite uninitialize = do
gitPreCommitHookUnWrite
removeRepoUUID
{- Will automatically initialize if there is already a git-annex {- Will automatically initialize if there is already a git-annex
branch from somewhere. Otherwise, require a manual init branch from somewhere. Otherwise, require a manual init

1
debian/changelog vendored
View file

@ -6,6 +6,7 @@ git-annex (3.20120419) UNRELEASED; urgency=low
* Add annex.http-headers and annex.http-headers-command config * Add annex.http-headers and annex.http-headers-command config
settings, to allow custom headers to be sent with all HTTP requests. settings, to allow custom headers to be sent with all HTTP requests.
(Requested by the Internet Archive) (Requested by the Internet Archive)
* uninit: Clear annex.uuid from .git/config. Closes: #670639
-- Joey Hess <joeyh@debian.org> Fri, 20 Apr 2012 16:14:08 -0400 -- Joey Hess <joeyh@debian.org> Fri, 20 Apr 2012 16:14:08 -0400