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

Function Repository_create_branch

src/repository.c:1274–1290  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1272 " repo.create_branch('foo', repo.head.peel(), force=False)");
1273
1274PyObject *
1275Repository_create_branch(Repository *self, PyObject *args)
1276{
1277 Commit *py_commit;
1278 git_reference *c_reference;
1279 char *c_name;
1280 int err, force = 0;
1281
1282 if (!PyArg_ParseTuple(args, "sO!|i", &c_name, &CommitType, &py_commit, &force))
1283 return NULL;
1284
1285 err = git_branch_create(&c_reference, self->repo, c_name, py_commit->commit, force);
1286 if (err < 0)
1287 return Error_set(err);
1288
1289 return wrap_branch(c_reference, self);
1290}
1291
1292
1293static PyObject *

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…