Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commita596e12

Browse files
guyzmoankostis
authored andcommitted
remote,#528: Improved way of listing URLs
+ Instead of using `git remote show` that may triggers connection toremote repo, use `git remote get-url --all` that works by onlyreading the `.git/config`.+ Change should have no functional impact, so no test needed.+ Works only with git -2.7+.Signed-off-by: Guyzmo <guyzmo+github@m0g.net>
1 parent53c1528 commita596e12

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

‎git/remote.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -496,10 +496,9 @@ def delete_url(self, url, **kwargs):
496496
defurls(self):
497497
""":return: Iterator yielding all configured URL targets on a remote
498498
as strings"""
499-
remote_details=self.repo.git.remote("show",self.name)
499+
remote_details=self.repo.git.remote("get-url","--all",self.name)
500500
forlineinremote_details.split('\n'):
501-
if' Push URL:'inline:
502-
yieldline.split(': ')[-1]
501+
yieldline
503502

504503
@property
505504
defrefs(self):

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp