-
Notifications
You must be signed in to change notification settings - Fork 899
Expose libgit2 fetch functionality. #206
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
Conversation
@jamill Wow! That's not a little PR, is it? ;-) Very nice job!
Yes, it's true. In fact, my dear @carlosmn has kind of a habit of rewriting the libgit2 network stack once every two months, which makes it kind of a moving tagret... 😄 More seriously, the same awesome @carlosmn is once again showing that there are so many ways to transmit some bytes over a wire, by leveraging WinHTTP on Windows. You can follow his work on libgit2/libgit2#901. I was thinking that, maybe, it would be a good idea to wait until he's done, then bind against this implementation. As LibGit2Sharp consumers are mostly Windows based, this could provide libgit2 with a quick feedback loop on potential issues and dragons out there. Moreover, some network callbacks have been recently added which may be quite handy. How do you feel about this? |
@nulltoken Thanks! I am fine with waiting until the WinHTTP work is complete. Do you have an idea when (roughly) the libgit2 library with the WinHTTP work and network callbacks will make it to LibGit2Sharp? I could build libgit2 locally, but would prefer to work against the version included with LibGit2Sharp :) Alternatively, I would also be fine submitting this now and then following up once the libgit2 changes make it to LibGit2Sharp (if, for instance, it will be a while before LibGit2Sharp gets these new additions). |
One option would be to wait for the branch to be merged. However, @ben is very eager as well to start on binding So, here's another option:
Note: as Fetch and Clone are pretty closely functions, you may have to team up with @ben on some aspects ;) |
I'm down for that. @jamill, take a look at https://github.com/libgit2/libgit2sharp/tree/benstraub/clone, which has a libgit2 built from @carlosmn's winhttp branch, and all the tests are green as of right now. Let me know if you need anything at all! |
Be advised that I'm probably going to rewrite my winhttp branch as I try to get to grips with the API, but yeah, if you find problems, so tell me, as I only run Windows to do or test Windows-specific things and otherwise never run the code. |
@nulltoken @ben Sounds good! Thanks for creating this new branch - I will grab it and work from there. I will include some more testing by fetching from the repository you have suggested. |
@jamill @ben I've updated the test repository and added some references
One thing to note: |
@nulltoken, @ben I have created another PR from the repository Ben created. Should I close this PR and we can continue the discussion on the updated PR (#213)? |
This pull request implements the basics needed to expose fetch through Libgit2Sharp.
I see there is issue #65 indicating that there might already be some other work done on fetch, and that the code is being polished, but this was over 4 months ago and I have not seen it in the main branch.
I did not implement the callback on git_remote_update_tips, as this function seems to be changing in the latest version of libgit2 (possibly why fetch has not made it into the main branch on LibGit2Sharp?).
Thanks,
Jameson