summaryrefslogtreecommitdiff
path: root/Remote
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2013-09-19 12:53:24 -0400
committerGravatar Joey Hess <joey@kitenet.net>2013-09-19 12:53:24 -0400
commit9bb2c50100c8504486da501ac0daec6cc027a493 (patch)
tree252b961f10a3ef85c6992cf4299d8f001973b81f /Remote
parentcc3e1e237961f8f0f00b130f4d3d0f47afbc53c3 (diff)
better probing for gcrypt repositories using new --check option
Now can tell if a repo uses gcrypt or not, and whether it's decryptable with the current gpg keys. This closes the hole that undecryptable gcrypt repos could have before been combined into the repo in encrypted mode.
Diffstat (limited to 'Remote')
-rw-r--r--Remote/GCrypt.hs2
-rw-r--r--Remote/Git.hs2
2 files changed, 2 insertions, 2 deletions
diff --git a/Remote/GCrypt.hs b/Remote/GCrypt.hs
index d5448ca64..27d368690 100644
--- a/Remote/GCrypt.hs
+++ b/Remote/GCrypt.hs
@@ -50,7 +50,7 @@ gen :: Git.Repo -> UUID -> RemoteConfig -> RemoteGitConfig -> Annex (Maybe Remot
gen gcryptr u c gc = do
g <- gitRepo
-- get underlying git repo with real path, not gcrypt path
- r <- liftIO $ Git.GCrypt.encryptedRepo g gcryptr
+ r <- liftIO $ Git.GCrypt.encryptedRemote g gcryptr
let r' = r { Git.remoteName = Git.remoteName gcryptr }
(mgcryptid, r'') <- liftIO $ getGCryptId r'
-- doublecheck that local cache matches underlying repo's gcrypt-id
diff --git a/Remote/Git.hs b/Remote/Git.hs
index d761b03ba..2802db9ae 100644
--- a/Remote/Git.hs
+++ b/Remote/Git.hs
@@ -128,7 +128,7 @@ repoAvail r
| Git.GCrypt.isEncrypted r = do
g <- gitRepo
liftIO $ do
- er <- Git.GCrypt.encryptedRepo g r
+ er <- Git.GCrypt.encryptedRemote g r
if Git.repoIsLocal er || Git.repoIsLocalUnknown er
then catchBoolIO $
void (Git.Config.read er) >> return True