libgit2/rugged — pull request #304 by arthurschreiber (2014-01-11 19:10:40+00:00)
Title: Remote revamp

This revamps the `Rugged::Remote` implementation that we currently have.

It removes the low-level `#connect`, `#connected?`, `#disconnect` and `#update_tips` methods in favor of "automatic" connection handling, which should be less error-prone and easier to use.

`Remote#ls` was modified to reflect this change.

Additionally, `Remote#fetch` was implemented with the same credentials support as `Repository#clone_at`, reusing most of the code that was there.

As part of the changes, support for the `:progress` and `:update_tips` callbacks was added to `Repository#clone_at`, and the `options` Hash structure was tweaked a bit.

`Remote#push` is still WIP, but should be added soon.

- - -

I'm not a 100% sure about the API - maybe `#fetch` and `#push` should be on the `Repository` instead of `Remote`? Or what about adding `Repository#fetch` and `Repository#push` convenience methods that take either a `Remote` or a `url` (and just forward to `Remote#push`/`Remote#fetch`)?