git.remote.Remote.set_url does not add new URL by default
The documentation for Remote.set_url states that new_url is "add[ed] as an extra remote URL" unless old_url parameter is passed. However, the way it is currently written, the method actually replaces the existing URL instead of adding a new one.
repo = git.Repo.init('.')
remote = repo.create_remote('name', 'url')
remote.set_url('newurl')
for url in repo.remote('name').urls::
print(url)
actual output:
newurl
expected:
url
newurl
I have a patch ready, but I'll hold off submitting a pull request since the current TestRemote.test_multiple_urls in test_remote.py actually depends on the current behavior, so I'm not sure whether to change the set_url docstring or the behavior.
Here I recommend improving the documentation to clarify what it does while considering the addition of another method to exhibit the new behaviour of actually adding another URL on top of the existing one as multi-value.