support annex-config-uuid when generating remote
This is used by a special remote with sameas-uuid= The remote's uuid is the sameas-uuid, but it needs to get its RemoteConfig from the annex-config-uuid.
This commit is contained in:
parent
0dd5691951
commit
2bd6e81bb0
2 changed files with 2 additions and 3 deletions
|
@ -105,7 +105,8 @@ remoteGen :: M.Map UUID RemoteConfig -> RemoteType -> Git.Repo -> Annex (Maybe R
|
||||||
remoteGen m t g = do
|
remoteGen m t g = do
|
||||||
u <- getRepoUUID g
|
u <- getRepoUUID g
|
||||||
gc <- Annex.getRemoteGitConfig g
|
gc <- Annex.getRemoteGitConfig g
|
||||||
let c = fromMaybe M.empty $ M.lookup u m
|
let cu = fromMaybe u $ remoteAnnexConfigUUID gc
|
||||||
|
let c = fromMaybe M.empty $ M.lookup cu m
|
||||||
generate t g u c gc >>= \case
|
generate t g u c gc >>= \case
|
||||||
Nothing -> return Nothing
|
Nothing -> return Nothing
|
||||||
Just r -> Just <$> adjustExportImport (adjustReadOnly (addHooks r))
|
Just r -> Just <$> adjustExportImport (adjustReadOnly (addHooks r))
|
||||||
|
|
|
@ -34,8 +34,6 @@ the remote.log. Eg, "B sameas=A foo=bar ..."
|
||||||
|
|
||||||
Implementation notes:
|
Implementation notes:
|
||||||
|
|
||||||
Next, need to make generating a Remote look at annex-config-uuid.
|
|
||||||
|
|
||||||
Need to get enableremote working for sameas.
|
Need to get enableremote working for sameas.
|
||||||
|
|
||||||
Deal with the per-remote state issue.
|
Deal with the per-remote state issue.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue