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

Method add_fetch

pygit2/remotes.py:519–525  ·  view source on GitHub ↗

Add a fetch refspec (str) to the remote

(self, name: str, refspec: str)

Source from the content-addressed store, hash-verified

517 check_error(err)
518
519 def add_fetch(self, name: str, refspec: str) -> None:
520 """Add a fetch refspec (str) to the remote"""
521
522 err = C.git_remote_add_fetch(
523 self._repo._repo, to_bytes(name), to_bytes(refspec)
524 )
525 check_error(err)
526
527 def add_push(self, name: str, refspec: str) -> None:
528 """Add a push refspec (str) to the remote"""

Callers 1

test_refspecFunction · 0.80

Calls 2

to_bytesFunction · 0.85
check_errorFunction · 0.85

Tested by 1

test_refspecFunction · 0.64