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

Function Branch_is_head

src/branch.c:68–82  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

66 "True if HEAD points at the branch, False otherwise.");
67
68PyObject *
69Branch_is_head(Branch *self)
70{
71 int err;
72
73 CHECK_REFERENCE(self);
74
75 err = git_branch_is_head(self->reference);
76 if (err == 1)
77 Py_RETURN_TRUE;
78 else if (err == 0)
79 Py_RETURN_FALSE;
80 else
81 return Error_set(err);
82}
83
84PyDoc_STRVAR(Branch_is_checked_out__doc__,
85 "is_checked_out() -> bool\n"

Callers

nothing calls this directly

Calls 1

Error_setFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…