MCPcopy Create free account
hub / github.com/libgit2/pygit2 / ls_remotes

Method ls_remotes

pygit2/remotes.py:284–306  ·  view source on GitHub ↗

Deprecated interface to list_heads

(
        self,
        callbacks: RemoteCallbacks | None = None,
        proxy: str | None | bool = None,
        connect: bool = True,
    )

Source from the content-addressed store, hash-verified

282 return results
283
284 def ls_remotes(
285 self,
286 callbacks: RemoteCallbacks | None = None,
287 proxy: str | None | bool = None,
288 connect: bool = True,
289 ) -> list[dict[str, Any]]:
290 """
291 Deprecated interface to list_heads
292 """
293 warnings.warn('Use list_heads', DeprecationWarning)
294
295 heads = self.list_heads(callbacks, proxy, connect)
296
297 return [
298 {
299 'local': h.local,
300 'oid': h.oid,
301 'loid': h.loid if h.local else None,
302 'name': h.name,
303 'symref_target': h.symref_target,
304 }
305 for h in heads
306 ]
307
308 def prune(self, callbacks: RemoteCallbacks | None = None) -> None:
309 """Perform a prune against this remote."""

Callers 1

Calls 1

list_headsMethod · 0.95

Tested by 1