FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Switching the `urls` property to use `git remote show` instead of `gi… · gitpython-developers/GitPython@04873ab · GitHub

Repository navigation

Commit 04873ab

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.0), and provokes failure on travis. Signed-off-by: Guyzmo <guyzmo+github@m0g.net>
1 parent 6b1dd8b commit 04873ab

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

‎git/remote.py‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -495,10 +495,10 @@ def delete_url(self, url, **kwargs):
495495
def urls(self):
496496
""":return: Iterator yielding all configured URL targets on a remote
497497
as strings"""
498-
scmd = 'get-url'
499-
kwargs = {'insert_kwargs_after': scmd}
500-
for url in self.repo.git.remote(scmd, self.name, all=True, **kwargs).split('\n'):
501-
yield url
498+
remote_details = self.repo.git.remote("show", self.name)
499+
for line in remote_details.split('\n'):
500+
if ' Push URL:' in line:
501+
yield line.split(': ')[-1]
502502

503503
@property
504504
def refs(self):

0 commit comments

Comments
 (0)

Back | FazBrowse Home | New Git URL