libgit2/objective-git — pull request #254 by tiennou (2013-09-10 20:21:37+00:00)
Title: Add a GTCred wrapper.

This adds support to `libgit2` `cred.h` API in advance of #224 and #252 (and push when the time comes). I'll obviously massage #224 to use it, and @isaac if you have the will (and time) to do the same with #252, that's cool, otherwise it can wait for another PR.

It feels more or less ready except for :

- This isn't used anywhere, as we have no fetch/push support yet, and #252 "prevents" me from switching clone to it.
- I have absolutely no idea how to test it because it depends on a working authenticated transport.
- There's a big PARTIALIMPL in one of the class methods, because I was happily wrapping stuff around, but when the time came for me to look up `LIBSSH2_USERAUTH_PUBLICKEY_SIGN_FUNC` in `libssh2`, I just, like, shivered in fear when I saw the LIBSSH2_SESSION parameter. That parameter means that if `libgit2` ever asks for a `GIT_CREDTYPE_SSH_PUBLICKEY` auth type, we have to traverse layers of C-code to get to the SSH layer and back again. As my experience with the `libgit2` code is minimal, it will take some time for me to see if there's a general solution.