diff options
author | Joey Hess <joey@kitenet.net> | 2013-09-05 16:02:39 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2013-09-05 16:02:39 -0400 |
commit | d9b78f90a9ceafa810d82c46d4eb489aeab8820b (patch) | |
tree | 9688db2d6ee58126edf955a6bfcfb46eab122485 /Remote/Git.hs | |
parent | 62f24fd4500bf49a404b2c0f79ec8f935b5f3fe5 (diff) |
automatically derive an annex-uuid from a gcrypt-uuids
Diffstat (limited to 'Remote/Git.hs')
-rw-r--r-- | Remote/Git.hs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Remote/Git.hs b/Remote/Git.hs index e269b9ad8..b3f64bfb8 100644 --- a/Remote/Git.hs +++ b/Remote/Git.hs @@ -26,6 +26,7 @@ import qualified Git import qualified Git.Config import qualified Git.Construct import qualified Git.Command +import qualified Git.GCrypt import qualified Annex import Logs.Presence import Logs.Transfer @@ -152,6 +153,12 @@ tryGitConfigRead r | Git.repoIsHttp r = do headers <- getHttpHeaders store $ geturlconfig headers + | Git.GCrypt.isEncrypted r = do + g <- gitRepo + case Git.GCrypt.remoteRepoId g r of + Nothing -> return r + Just v -> store $ liftIO $ setUUID r $ + genUUIDInNameSpace gCryptNameSpace v | Git.repoIsUrl r = return r | otherwise = store $ safely $ onLocal r $ do ensureInitialized |