libgit2/libgit2 — pull request #725 by carlosmn (2012-05-24 14:17:05+00:00)
Title: RFC: A proposal for setting callbacks

The code right now doesn't use many callbacks, but pretend that we do support the side-band (coming soon). Either we pass two callbacks to `git_remote_download` and hope that the git protocol never changes in a way that would cause side-band data to be sent before we call that function, or we set the callbacks before we start talking to the server.

We'll also need to use two callbacks for the connection phase (one if we don't like the server and one if the server doesn't like us).

At some point we might want to add a `git_fetch()` function that does all of the remote handling for the user, and we could end up having to pass four or five callbacks to it.

So I'd like to propose to use either this or something similar (maybe use a different function to set each callback, but I'm not sure that's preferable). It's not particularly pretty, but the whole connecting to another computer thing is a dirty business.