Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ability to cancel the remote part of the clone operation #439

Merged
merged 2 commits into from
Feb 4, 2015
Merged

Add ability to cancel the remote part of the clone operation #439

merged 2 commits into from
Feb 4, 2015

Conversation

alehed
Copy link
Contributor

@alehed alehed commented Feb 4, 2015

This makes the transferProgressBlock look more like its libgit equivalent
the git_transfer_progress_cb.

This makes the transferProgressBlock look more like its libgit equivalent
the git_transfer_progress_cb.
@alehed
Copy link
Contributor Author

alehed commented Feb 4, 2015

I don't know whether it is worth introducing a breaking change for such a small
feature but in my opinion objective-git should have allowed this in the first place.
Feel free to take away the comment, I just thought it would be good documenting
the change somewhere.

@joshaber joshaber self-assigned this Feb 4, 2015
@joshaber
Copy link
Member

joshaber commented Feb 4, 2015

Thanks! I think it's a great idea to be able to cancel the transfer, but I think it'd be more idiomatic in Objective-C for the block to set a stop argument. E.g.,

transferProgressBlock:(void (^)(const git_transfer_progress *, BOOL *stop))transferProgressBlock

@phatblat
Copy link
Member

phatblat commented Feb 4, 2015

+1 for *stop

Now the remote operation is cancelled via a stop parameter instead of
a negative return value.
@alehed
Copy link
Contributor Author

alehed commented Feb 4, 2015

I think this should do the trick

@joshaber
Copy link
Member

joshaber commented Feb 4, 2015

Awesome, thanks @alehed!

joshaber added a commit that referenced this pull request Feb 4, 2015
Add ability to cancel the remote part of the clone operation
@joshaber joshaber merged commit 9a2c37c into libgit2:master Feb 4, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants