Skip to content

Commit 3b8a6f4

Browse files
committed
fixup: Leverage git_error_set_after_callback_function
1 parent b14cc27 commit 3b8a6f4

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/rebase.c

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -987,13 +987,13 @@ static int rebase_commit__create(
987987
goto done;
988988

989989
git_error_clear();
990-
if ((error = rebase->options.signing_cb(&commit_signature, &signature_field,
991-
git_buf_cstr(&commit_content), rebase->options.payload)) < 0 &&
992-
error != GIT_PASSTHROUGH) {
993-
if (git_error_last() == NULL)
994-
git_error_set(GIT_ERROR_CALLBACK, "commit signing_cb failed");
995-
goto done;
996-
}
990+
error = git_error_set_after_callback_function(rebase->options.signing_cb(
991+
&commit_signature, &signature_field, git_buf_cstr(&commit_content),
992+
rebase->options.payload), "commit signing_cb failed");
993+
if (error == GIT_PASSTHROUGH)
994+
git_error_clear();
995+
else if (error < 0)
996+
goto done;
997997

998998
if (error != GIT_PASSTHROUGH) {
999999
if (git_buf_is_allocated(&signature_field)) {

0 commit comments

Comments
 (0)