Skip to content

Commit c780aff

Browse files
committed
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.3), and provokes failure on travis. Signed-off-by: Guyzmo <[email protected]>
1 parent b366d3f commit c780aff

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Diff for: git/remote.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -477,10 +477,10 @@ def delete_url(self, url, **kwargs):
477477
def urls(self):
478478
""":return: Iterator yielding all configured URL targets on a remote
479479
as strings"""
480-
scmd = 'get-url'
481-
kwargs = {'insert_kwargs_after': scmd}
482-
for url in self.repo.git.remote(scmd, self.name, all=True, **kwargs).split('\n'):
483-
yield url
480+
remote_details = self.repo.git.remote("show", self.name)
481+
for line in remote_details.split('\n'):
482+
if ' Push URL:' in line:
483+
yield line.split(': ')[-1]
484484

485485
@property
486486
def refs(self):

0 commit comments

Comments
 (0)