summaryrefslogtreecommitdiff
path: root/lib/git/remote.py
diff options
context:
space:
mode:
authorSebastian Thiel <byronimo@gmail.com>2009-10-28 15:15:14 +0100
committerSebastian Thiel <byronimo@gmail.com>2009-10-28 15:15:14 +0100
commit4712c619ed6a2ce54b781fe404fedc269b77e5dd (patch)
tree01fd034949870e2c7a0ce6ff0367fa0d954caa3c /lib/git/remote.py
parentdc518251eb64c3ef90502697a7e08abe3f8310b2 (diff)
downloadgitpython-4712c619ed6a2ce54b781fe404fedc269b77e5dd.tar.gz
Fixed bug when listing remotes - it was based on references which is incorrect as it cannot always work
Diffstat (limited to 'lib/git/remote.py')
-rw-r--r--lib/git/remote.py11
1 files changed, 2 insertions, 9 deletions
diff --git a/lib/git/remote.py b/lib/git/remote.py
index ace5128a..562a5082 100644
--- a/lib/git/remote.py
+++ b/lib/git/remote.py
@@ -238,16 +238,9 @@ class Remote(LazyMixin, Iterable):
Returns
Iterator yielding Remote objects of the given repository
"""
- # parse them using refs, as their query can be faster as it is
- # purely based on the file system
seen_remotes = set()
- for ref in RemoteReference.iter_items(repo):
- remote_name = ref.remote_name
- if remote_name in seen_remotes:
- continue
- # END if remote done already
- seen_remotes.add(remote_name)
- yield Remote(repo, remote_name)
+ for name in repo.git.remote().splitlines():
+ yield Remote(repo, name)
# END for each ref
@property