uninit: Clear annex.uuid from .git/config. Closes: #670639
This commit is contained in:
parent
a2ee4386bb
commit
e0b7012ccc
3 changed files with 11 additions and 2 deletions
|
@ -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 ""
|
||||
|
||||
|
|
4
Init.hs
4
Init.hs
|
@ -29,7 +29,9 @@ initialize mdescription = do
|
|||
maybe (recordUUID u) (describeUUID u) mdescription
|
||||
|
||||
uninitialize :: Annex ()
|
||||
uninitialize = gitPreCommitHookUnWrite
|
||||
uninitialize = do
|
||||
gitPreCommitHookUnWrite
|
||||
removeRepoUUID
|
||||
|
||||
{- Will automatically initialize if there is already a git-annex
|
||||
branch from somewhere. Otherwise, require a manual init
|
||||
|
|
1
debian/changelog
vendored
1
debian/changelog
vendored
|
@ -6,6 +6,7 @@ git-annex (3.20120419) UNRELEASED; urgency=low
|
|||
* Add annex.http-headers and annex.http-headers-command config
|
||||
settings, to allow custom headers to be sent with all HTTP requests.
|
||||
(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
|
||||
|
||||
|
|
Loading…
Reference in a new issue