support enableremote of git repo changing eg autoenable=
authorJoey Hess <joeyh@joeyh.name>
Tue, 18 Apr 2023 18:00:02 +0000 (14:00 -0400)
committerJoey Hess <joeyh@joeyh.name>
Tue, 18 Apr 2023 18:00:24 +0000 (14:00 -0400)
commit8728695b9c1141e4c176b077c1cf9388e41823b2
tree505303a372212f90b5d9dba43d69d2a212420c36
parent3a402a907ffd4bd2177ecef3eec004cba59d684f
support enableremote of git repo changing eg autoenable=

enableremote: Support enableremote of a git remote (that was previously set
up with initremote) when additional parameters such as autoenable= are
passed.

The enableremote special case for regular git repos is intended to handle
ones that don't have a UUID probed, and the user wants git-annex to
re-probe. So, that special case is still needed. But, in that special
case, the user is not passing any extra parameters. So, when there are
parameters, instead run the special remote setup code. That requires there
to be a uuid known already, and it allows changing things like autoenable=

Remote.Git.enableRemote changed to be a no-op if a git remote with the name
already exists. Which it generally will in this case.

Sponsored-by: Jack Hill on Patreon
CHANGELOG
Command/EnableRemote.hs
Remote/Git.hs
doc/bugs/Disabling_remote_auto-enabling_not_possible/comment_4_4f3e9f15fcc96cd98c6915ec68cc471f._comment