Skip to content

Commit a3145c1

Browse files
committed
Enable automatic proxy detection for remote ls_remotes()
See #642
1 parent e7f14f6 commit a3145c1

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

pygit2/remote.py

+8-2
Original file line numberDiff line numberDiff line change
@@ -159,13 +159,19 @@ def fetch(self, refspecs=None, message=None, callbacks=None, prune=C.GIT_FETCH_P
159159

160160
return TransferProgress(C.git_remote_stats(self._remote))
161161

162-
def ls_remotes(self, callbacks=None):
162+
def ls_remotes(self, callbacks=None, proxy=None):
163163
"""
164164
Return a list of dicts that maps to `git_remote_head` from a
165165
`ls_remotes` call.
166+
167+
Parameters:
168+
169+
callbacks : Passed to connect()
170+
171+
proxy : Passed to connect()
166172
"""
167173

168-
self.connect(callbacks=callbacks)
174+
self.connect(callbacks=callbacks, proxy=proxy)
169175

170176
refs = ffi.new('git_remote_head ***')
171177
refs_len = ffi.new('size_t *')

0 commit comments

Comments
 (0)