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

Method create_anonymous

pygit2/remotes.py:470–478  ·  view source on GitHub ↗

Create a new anonymous (in-memory only) remote with the given URL. Returns a object.

(self, url: str)

Source from the content-addressed store, hash-verified

468 return Remote(self._repo, cremote[0])
469
470 def create_anonymous(self, url: str) -> Remote:
471 """Create a new anonymous (in-memory only) remote with the given URL.
472 Returns a <Remote> object.
473 """
474 cremote = ffi.new('git_remote **')
475 url_bytes = to_bytes(url)
476 err = C.git_remote_create_anonymous(cremote, self._repo._repo, url_bytes)
477 check_error(err)
478 return Remote(self._repo, cremote[0])
479
480 def rename(self, name: str, new_name: str) -> list[str]:
481 """Rename a remote in the configuration. The refspecs in standard

Callers 2

Calls 3

to_bytesFunction · 0.85
check_errorFunction · 0.85
RemoteClass · 0.85

Tested by 2