Adding support for git remote set-url/get-url API to Remote · gitpython-developers/GitPython@b366d3f · GitHub
Skip to content

Commit b366d3f

Browse files
committed
Adding support for git remote set-url/get-url API to Remote
Both commands enable handling of a little known feature of git, which is to support multiple URL for one remote. You can add multiple url using the `set_url` subcommand of `git remote`. As listing them is also handy, there's a nice method to do it, using `get_url`. * adding set_url method that maps to the git remote set-url command¶ * can be used to set an URL, or replace an URL with optional positional arg¶ * can be used to add, delete URL with kwargs (matching set-url options)¶ * adding add_url, delete_url methods that wraps around set_url for conveniency¶ * adding urls property that yields an iterator over the setup urls for a remote¶ * adding a test suite that checks all use case scenarii of this added API.¶ Signed-off-by: Guyzmo <guyzmo+github@m0g.net>
1 parent 902679c commit b366d3f

2 files changed

Lines changed: 95 additions & 2 deletions

File tree

git/remote.py

Lines changed: 48 additions & 0 deletions

git/test/test_remote.py

Lines changed: 47 additions & 2 deletions

0 commit comments

Comments
 (0)