summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuyzmo <guyzmo+github@m0g.net>2016-06-08 19:45:35 +0200
committerGuyzmo <guyzmo+github@m0g.net>2016-06-08 19:47:43 +0200
commit3f4b410c955ea08bfb7842320afa568090242679 (patch)
tree95bb2a60d180be482a4a12a06b2765d274c2be48
parentb366d3fabd79e921e30b44448cb357a05730c42f (diff)
downloadgitpython-3f4b410c955ea08bfb7842320afa568090242679.tar.gz
Switching the `urls` property to use `git remote show` instead of `git remote get-url`
`get-url` is a new API that is not widely available yet (introduced in git 2.7.0), and provokes failure on travis. Signed-off-by: Guyzmo <guyzmo+github@m0g.net>
-rw-r--r--git/remote.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/git/remote.py b/git/remote.py
index ef02c629..5e9fe2c0 100644
--- a/git/remote.py
+++ b/git/remote.py
@@ -477,10 +477,10 @@ class Remote(LazyMixin, Iterable):
def urls(self):
""":return: Iterator yielding all configured URL targets on a remote
as strings"""
- scmd = 'get-url'
- kwargs = {'insert_kwargs_after': scmd}
- for url in self.repo.git.remote(scmd, self.name, all=True, **kwargs).split('\n'):
- yield url
+ remote_details = self.repo.git.remote("show", self.name)
+ for line in remote_details.split('\n'):
+ if ' Push URL:' in line:
+ yield line.split(': ')[-1]
@property
def refs(self):