Skip to content

Commit 34073bf

Browse files
commit: Fix git_commit_create_from_stage without author and committer
1 parent e2db98f commit 34073bf

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/libgit2/commit.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1107,8 +1107,10 @@ int git_commit_create_from_stage(
11071107
if (given_opts)
11081108
memcpy(&opts, given_opts, sizeof(git_commit_create_options));
11091109

1110-
if ((author = opts.author) == NULL ||
1111-
(committer = opts.committer) == NULL) {
1110+
author = opts.author;
1111+
committer = opts.committer;
1112+
1113+
if (!author || !committer) {
11121114
if (git_signature_default(&default_signature, repo) < 0)
11131115
goto done;
11141116

0 commit comments

Comments
 (0)