warn and refuse to autoenable a special remote when name is in use
authorJoey Hess <joeyh@joeyh.name>
Thu, 14 Aug 2025 15:05:42 +0000 (11:05 -0400)
committerJoey Hess <joeyh@joeyh.name>
Thu, 14 Aug 2025 15:05:42 +0000 (11:05 -0400)
commit0b388c09241216b44700311e5513360a613cbd4f
tree36c640f5f5e5c623f9745406655b57f4d2b47f35
parent5323e0c20bcee0dab25c4c66540a7df95e7d0a18
warn and refuse to autoenable a special remote when name is in use

Improve behavior when there are special remotes configured with
autoenable=yes with names that conflict with other remotes.

The use of remoteList' is to avoid using the cached remote list in the case
where there are two special remotes both configured to autoenable and both
with the same name. Once the 1st is autoenabled, this makes reload the
remote list and so see the 1st, and so refuse to autoenable the second.

This adds a little bit of overhead, but it should be sufficiently small not
to need optimising.

Sponsored-by: Dartmouth College's OpenNeuro project
Annex/SpecialRemote.hs
CHANGELOG
doc/bugs/multiple_records_in_remote.log_for_the_same_remote.mdwn
doc/bugs/multiple_records_in_remote.log_for_the_same_remote/comment_3_fe26531dcfa26b30225dc34a841153d1._comment
doc/bugs/multiple_records_in_remote.log_for_the_same_remote/comment_4_87330e2378759679069ab0fce1df3e92._comment [new file with mode: 0644]