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 ..."

done; this is implemented as git annex initremote --sameas --Joey