Skip to content

Commit

Permalink
Switching the urls property to use git remote show instead of `gi…
Browse files Browse the repository at this point in the history
…t remote get-url`

`get-url` is a new API that is not widely available yet (introduced in git 2.7.3), and
provokes failure on travis.

Signed-off-by: Guyzmo <guyzmo+github@m0g.net>
  • Loading branch information
guyzmo committed Jun 8, 2016
1 parent b366d3f commit c780aff
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions git/remote.py
Expand Up @@ -477,10 +477,10 @@ def delete_url(self, url, **kwargs):
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):
Expand Down

0 comments on commit c780aff

Please sign in to comment.