Skip to content

Commit

Permalink
fix: use correct type of the ninth parameter of git_commit_create()
Browse files Browse the repository at this point in the history
It should be `const git_commit **`, not `git_commit **`.

Breaks the build with GCC-14.
  • Loading branch information
mcepl committed Nov 5, 2024
1 parent 2b57949 commit eba710e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/repository.c
Original file line number Diff line number Diff line change
Expand Up @@ -1065,7 +1065,8 @@ Repository_create_commit(Repository *self, PyObject *args)

err = git_commit_create(&oid, self->repo, update_ref,
py_author->signature, py_committer->signature,
encoding, message, tree, parent_count, parents);
encoding, message, tree, parent_count,
(const git_commit **)parents);
if (err < 0) {
Error_set(err);
goto out;
Expand Down Expand Up @@ -1147,7 +1148,8 @@ Repository_create_commit_string(Repository *self, PyObject *args)

err = git_commit_create_buffer(&buf, self->repo,
py_author->signature, py_committer->signature,
encoding, message, tree, parent_count, parents);
encoding, message, tree, parent_count,
(const git_commit **)parents);
if (err < 0) {
Error_set(err);
goto out;
Expand Down

0 comments on commit eba710e

Please sign in to comment.