diff options
| author | Carlos Martín Nieto <cmn@dwim.me> | 2015-04-21 20:16:48 +0200 |
|---|---|---|
| committer | Carlos Martín Nieto <cmn@dwim.me> | 2015-05-13 09:46:35 +0200 |
| commit | 05259114427234831cf4915cbe40a5bb8ea021b0 (patch) | |
| tree | 127d7d88b7789954544bb78981058fa35e1de54d /src/remote.c | |
| parent | f85a9c2767b43f35904bf39858488a4b7bc304e8 (diff) | |
| download | libgit2-05259114427234831cf4915cbe40a5bb8ea021b0.tar.gz | |
push: remove own copy of callbacks
The push object knows which remote it's associated with, and therefore
does not need to keep its own copy of the callbacks stored in the
remote.
Remove the copy and simply access the callbacks struct within the
remote.
Diffstat (limited to 'src/remote.c')
| -rw-r--r-- | src/remote.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/src/remote.c b/src/remote.c index 5257e85f3..91ebdd53c 100644 --- a/src/remote.c +++ b/src/remote.c @@ -2360,16 +2360,10 @@ int git_remote_upload(git_remote *remote, const git_strarray *refspecs, const gi } } - cbs = &remote->callbacks; - if ((error = git_push_set_callbacks(push, - cbs->pack_progress, cbs->payload, - cbs->push_transfer_progress, cbs->payload, - cbs->push_negotiation, cbs->payload)) < 0) - goto cleanup; - if ((error = git_push_finish(push)) < 0) goto cleanup; + cbs = &remote->callbacks; if (cbs->push_update_reference && (error = git_push_status_foreach(push, cbs->push_update_reference, cbs->payload)) < 0) goto cleanup; |
