Hard-code callback version because we'll need to change the defs if it changes.

This commit is contained in:
Matthew Duggan
2014-08-18 21:12:34 +09:00
parent 9ce6a26db3
commit 99433ca66a
2 changed files with 4 additions and 4 deletions

View File

@@ -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];

View File

@@ -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