Unverified Commit 2dbc810a by Edward Thomson Committed by GitHub

Merge pull request #6675 from libgit2/ethomson/push_cancel

push: set generic error in push_negotiation cb
parents ac238667 8b7495fc
......@@ -444,10 +444,21 @@ static int do_push(git_push *push)
if ((error = calculate_work(push)) < 0)
goto on_error;
if (callbacks && callbacks->push_negotiation &&
(error = callbacks->push_negotiation((const git_push_update **) push->updates.contents,
push->updates.length, callbacks->payload)) < 0)
goto on_error;
if (callbacks && callbacks->push_negotiation) {
git_error_clear();
error = callbacks->push_negotiation(
(const git_push_update **) push->updates.contents,
push->updates.length, callbacks->payload);
if (error < 0) {
git_error_set_after_callback_function(error,
"push_negotiation");
goto on_error;
}
error = 0;
}
if ((error = queue_objects(push)) < 0 ||
(error = transport->push(transport, push)) < 0)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment