From 5b1882254551cc9031d919c2f31c05153a665762 Mon Sep 17 00:00:00 2001 From: Jameson Miller Date: Wed, 2 Oct 2013 13:45:32 -0400 Subject: Support cancellation in push operation This commit adds cancellation for the push operation. This work consists of: 1) Support cancellation during push operation - During object counting phase - During network transfer phase - Propagate GIT_EUSER error code out to caller 2) Improve cancellation support during fetch - Handle cancellation request during network transfer phase - Clear error string when cancelled during indexing 3) Fix error handling in git_smart__download_pack Cancellation during push is still only handled in the pack building and network transfer stages of push (and not during packbuilding). --- src/push.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/push.c') diff --git a/src/push.c b/src/push.c index 698079253..a799db8d0 100644 --- a/src/push.c +++ b/src/push.c @@ -582,7 +582,7 @@ static int calculate_work(git_push *push) static int do_push(git_push *push) { - int error; + int error = 0; git_transport *transport = push->remote->transport; if (!transport->push) { @@ -611,8 +611,6 @@ static int do_push(git_push *push) (error = transport->push(transport, push)) < 0) goto on_error; - error = 0; - on_error: git_packbuilder_free(push->pb); return error; -- cgit v1.2.3