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

Function Branch_upstream__get__

src/branch.c:204–219  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

202 "Set to None to unset the upstream configuration.");
203
204PyObject *
205Branch_upstream__get__(Branch *self)
206{
207 int err;
208 git_reference *c_reference;
209
210 CHECK_REFERENCE(self);
211
212 err = git_branch_upstream(&c_reference, self->reference);
213 if (err == GIT_ENOTFOUND)
214 Py_RETURN_NONE;
215 else if (err < GIT_OK)
216 return Error_set(err);
217
218 return wrap_branch(c_reference, self->repo);
219}
220
221int Branch_upstream__set__(Branch *self, Reference *py_ref)
222{

Callers

nothing calls this directly

Calls 2

Error_setFunction · 0.85
wrap_branchFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…