Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/libgit2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJameson Miller <jamill@microsoft.com>2013-10-02 21:45:32 +0400
committerJameson Miller <jamill@microsoft.com>2013-10-02 23:12:44 +0400
commit5b1882254551cc9031d919c2f31c05153a665762 (patch)
treea5a4b2fab8622f11bd70bd4388f14bc6557d07a1 /src/push.c
parent5bfead1dba919f6b47f52da675ea94407e8baf49 (diff)
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).
Diffstat (limited to 'src/push.c')
-rw-r--r--src/push.c4
1 files changed, 1 insertions, 3 deletions
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;