summaryrefslogtreecommitdiff
path: root/doc/todo/support_multiple_special_remotes_with_same_uuid.mdwn
blob: f8c42338f4f5fa5cabcf0fbafce55c80604ea055 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
If the same data storage can be accessed via two protocols, two different
special remotes could be configured that access the same data, and so
should have the same uuids.

This is not possible though, because remote.log is uuid-based and so
the special remote configs stored in it for a given uuid would apply to
both special remotes.

It is already possible of course for two git remotes to have the same uuid,
and also for a special remote and git remotes to have the same uuid.

----

One approach would be to add some kind of namespace to the configs in
remote.log. But this seems problematic, the user would need to juggle
remote names and namespaces.

Another approach is to have a way to make two uuids be treated as
equivilant. Eg, to make uuid B be treated the same as uuid A. 

Suppose there's an equivilance.log that contains "ts B A". Then when git
config is read, a remote with uuid B will result in constuction of a
`Remote` with uuid A, but with the `RemoteConfig` of uuid B.

Seems like this would be the only place the equivilance.log would need to
be used, once the `Remote` is constucted using the equivilant uuid the rest
of the code will work as-is.

That would add overhead of an additional git-annex branch read on every
program start. That could be avoided by instead putting the equivilance in
the remote.log. Eg, "B sameas=A foo=bar ..."

---- 

Implementation notes:

Deal with the per-remote state issue.

renameremote will probably not work

Annex.InitRemote.autoEnable does not work right for sameas.

Any other things mentioned in the comments..