From 8f0104ecc54db00a075310ab744a19eb60e3d740 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20Mart=C3=ADn=20Nieto?= Date: Tue, 21 Apr 2015 22:10:36 +0200 Subject: Remove the callbacks struct from the remote Having the setting be different from calling its actions was not a great idea and made for the sake of the wrong convenience. Instead of that, accept either fetch options, push options or the callbacks when dealing with the remote. The fetch options are currently only the callbacks, but more options will be moved from setters and getters on the remote to the options. This does mean passing the same struct along the different functions but the typical use-case will only call git_remote_fetch() or git_remote_push() and so won't notice much difference. --- include/git2/sys/transport.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/git2/sys') diff --git a/include/git2/sys/transport.h b/include/git2/sys/transport.h index 2cb1a97eb..d6ca8ff05 100644 --- a/include/git2/sys/transport.h +++ b/include/git2/sys/transport.h @@ -61,7 +61,7 @@ struct git_transport { git_transport *transport); /* Executes the push whose context is in the git_push object. */ - int (*push)(git_transport *transport, git_push *push); + int (*push)(git_transport *transport, git_push *push, const git_remote_callbacks *callbacks); /* This function may be called after a successful call to connect(), when * the direction is FETCH. The function performs a negotiation to calculate -- cgit v1.2.1