@@ -194,6 +194,8 @@ static void checkoutProgressCallback(const char *path, size_t completedSteps, si
194194 block (nsPath, completedSteps, totalSteps);
195195}
196196
197+ #if 0
198+
197199static int transferProgressCallback(const git_transfer_progress *progress, void *payload) {
198200 if (payload == NULL) return 0;
199201 struct GTClonePayload *pld = payload;
@@ -212,21 +214,16 @@ static int transferProgressCallback(const git_transfer_progress *progress, void
212214static int remoteCreate(git_remote **remote, git_repository *repo, const char *name, const char *url, void *payload)
213215{
214216 int error;
215- struct GTRemoteCreatePayload *pld = payload;
216- git_remote_callbacks *callbacks = &pld->remoteCallbacks ;
217-
218217 if ((error = git_remote_create(remote, repo, name, url)) < 0)
219218 return error;
220219
221- return git_remote_set_callbacks (*remote, callbacks) ;
220+ return GIT_OK ;
222221}
223222
224- struct GTRemoteCreatePayload {
225- git_remote_callbacks remoteCallbacks;
226- };
223+ #endif
227224
228225+ (instancetype )cloneFromURL : (NSURL *)originURL toWorkingDirectory : (NSURL *)workdirURL options : (NSDictionary *)options error : (NSError **)error transferProgressBlock : (void (^)(const git_transfer_progress *, BOOL *stop))transferProgressBlock checkoutProgressBlock : (void (^)(NSString *path, NSUInteger completedSteps, NSUInteger totalSteps))checkoutProgressBlock {
229-
226+ # if 0
230227 git_clone_options cloneOptions = GIT_CLONE_OPTIONS_INIT;
231228
232229 NSNumber *bare = options[GTRepositoryCloneOptionsBare];
@@ -259,11 +256,7 @@ + (instancetype)cloneFromURL:(NSURL *)originURL toWorkingDirectory:(NSURL *)work
259256 cloneOptions.remote_callbacks.transfer_progress = transferProgressCallback;
260257 cloneOptions.remote_callbacks.payload = &payload;
261258
262- struct GTRemoteCreatePayload remoteCreatePayload;
263- remoteCreatePayload.remoteCallbacks = cloneOptions.remote_callbacks ;
264-
265259 cloneOptions.remote_cb = remoteCreate;
266- cloneOptions.remote_cb_payload = &remoteCreatePayload;
267260
268261 BOOL localClone = [options[GTRepositoryCloneOptionsCloneLocal] boolValue];
269262 if (localClone) {
@@ -295,6 +288,9 @@ + (instancetype)cloneFromURL:(NSURL *)originURL toWorkingDirectory:(NSURL *)work
295288 }
296289
297290 return [[self alloc] initWithGitRepository:repository];
291+ #endif
292+
293+ return nil ;
298294}
299295
300296- (id )lookUpObjectByGitOid : (const git_oid *)oid objectType : (GTObjectType)type error : (NSError **)error {
0 commit comments