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

Method add_push

pygit2/remotes.py:527–531  ·  view source on GitHub ↗

Add a push refspec (str) to the remote

(self, name: str, refspec: str)

Source from the content-addressed store, hash-verified

525 check_error(err)
526
527 def add_push(self, name: str, refspec: str) -> None:
528 """Add a push refspec (str) to the remote"""
529
530 err = C.git_remote_add_push(self._repo._repo, to_bytes(name), to_bytes(refspec))
531 check_error(err)

Callers 1

test_refspecFunction · 0.80

Calls 2

to_bytesFunction · 0.85
check_errorFunction · 0.85

Tested by 1

test_refspecFunction · 0.64