Hard-code callback version because we'll need to change the defs if it changes.
This commit is contained in:
@@ -12,7 +12,6 @@ typedef ... git_index_conflict_iterator;
|
|||||||
|
|
||||||
#define GIT_OID_RAWSZ ...
|
#define GIT_OID_RAWSZ ...
|
||||||
#define GIT_PATH_MAX ...
|
#define GIT_PATH_MAX ...
|
||||||
#define GIT_REMOTE_CALLBACKS_VERSION ...
|
|
||||||
|
|
||||||
typedef struct git_oid {
|
typedef struct git_oid {
|
||||||
unsigned char id[20];
|
unsigned char id[20];
|
||||||
|
@@ -191,11 +191,12 @@ class Remote(object):
|
|||||||
Perform a fetch against this remote.
|
Perform a fetch against this remote.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
# Get the default callbacks first
|
||||||
defaultcallbacks = ffi.new('git_remote_callbacks *')
|
defaultcallbacks = ffi.new('git_remote_callbacks *')
|
||||||
err = C.git_remote_init_callbacks(defaultcallbacks,
|
err = C.git_remote_init_callbacks(defaultcallbacks, 1)
|
||||||
C.GIT_REMOTE_CALLBACKS_VERSION)
|
check_error(err)
|
||||||
|
|
||||||
# Build the callback structure
|
# Build custom callback structure
|
||||||
callbacks = ffi.new('git_remote_callbacks *')
|
callbacks = ffi.new('git_remote_callbacks *')
|
||||||
callbacks.version = 1
|
callbacks.version = 1
|
||||||
callbacks.sideband_progress = self._sideband_progress_cb
|
callbacks.sideband_progress = self._sideband_progress_cb
|
||||||
|
Reference in New Issue
Block a user