From b2ffbaf43ca2773e51ff2d5665db67f86f8ccdd7 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 12 Sep 2013 15:54:35 -0400 Subject: Support hot-swapping of removable drives containing gcrypt repositories. To support this, a core.gcrypt-id is stored by git-annex inside the git config of a local gcrypt repository, when setting it up. That is compared with the remote's cached gcrypt-id. When different, a drive has been changed. git-annex then looks up the remote config for the uuid mapped from the core.gcrypt-id, and tweaks the configuration appropriately. When there is no known config for the uuid, it will refuse to use the remote. --- Types/Remote.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Types') diff --git a/Types/Remote.hs b/Types/Remote.hs index 6c0f89346..78008ce06 100644 --- a/Types/Remote.hs +++ b/Types/Remote.hs @@ -29,7 +29,7 @@ data RemoteTypeA a = RemoteType { -- enumerates remotes of this type enumerate :: a [Git.Repo], -- generates a remote of this type - generate :: Git.Repo -> UUID -> RemoteConfig -> RemoteGitConfig -> a (RemoteA a), + generate :: Git.Repo -> UUID -> RemoteConfig -> RemoteGitConfig -> a (Maybe (RemoteA a)), -- initializes or changes a remote setup :: Maybe UUID -> RemoteConfig -> a (RemoteConfig, UUID) } -- cgit v1.2.3