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

Function Branch_remote_name__get__

src/branch.c:178–197  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

176 "function will raise ValueError.");
177
178PyObject *
179Branch_remote_name__get__(Branch *self)
180{
181 int err;
182 git_buf name = {NULL};
183 const char *branch_name;
184 PyObject *py_name;
185
186 CHECK_REFERENCE(self);
187
188 branch_name = git_reference_name(self->reference);
189 err = git_branch_remote_name(&name, self->repo->repo, branch_name);
190 if (err < GIT_OK)
191 return Error_set(err);
192
193 py_name = to_unicode_n(name.ptr, name.size, NULL, NULL);
194 git_buf_dispose(&name);
195
196 return py_name;
197}
198
199
200PyDoc_STRVAR(Branch_upstream__doc__,

Callers

nothing calls this directly

Calls 2

Error_setFunction · 0.85
to_unicode_nFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…