enableremote: Avoid overwriting existing git remote when passed the uuid of a specialremote that was earlier initialized with the same name

This commit is contained in:
Joey Hess 2023-09-22 13:29:48 -04:00
parent 80ee107880
commit 41f4d0bda9
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
4 changed files with 32 additions and 0 deletions

View file

@ -9,3 +9,5 @@ annex-uuid and adding whatever other git configs the special remote uses.
(initremote does check if there's already a remote with the same name, and
refuses to overwrite it).
> [[fixed|done]] --[[Joey]]

View file

@ -0,0 +1,18 @@
[[!comment format=mdwn
username="joey"
subject="""comment 1"""
date="2023-09-22T17:05:28Z"
content="""
The behavior in the first case has changed, it now displays:
enableremote (normal) foo ok
And the normal git remote is left as-is. Which seems more or less
reasonable.
The behavior in the second case (passing the uuid) is still as described.
I've fixed that to instead fail with:
git-annex: Not overwriting currently configured git remote named "foo"
"""]]