Exemplo n.º 1
0
int
Remote_push_refspecs__set__(Remote *self, PyObject *py_list)
{
    int err;
    git_strarray push_refspecs;

    if (get_strarraygit_from_pylist(&push_refspecs, py_list) != 0)
        return -1;

    err = git_remote_set_push_refspecs(self->remote, &push_refspecs);
    git_strarray_free(&push_refspecs);

    if (err < 0) {
        Error_set(err);
        return -1;
    }

    return 0;
}
Exemplo n.º 2
0
PyObject *
Index_add_all(Index *self, PyObject *pylist)
{
    int err;
    git_strarray pathspec;

    if (get_strarraygit_from_pylist(&pathspec, pylist) < 0)
        return NULL;

    err = git_index_add_all(self->index, &pathspec, 0, NULL, NULL);
    git_strarray_free(&pathspec);

    if (err < 0) {
        Error_set(err);
        return NULL;
    }

    Py_RETURN_NONE;
}