libgit2/libgit2sharp — pull request #567 by Yogu (2013-11-19 22:05:19+00:00)
Title: Extended RemoteUpdater to update refspecs

Push/Pull Ref Specs can be updated via Remotes.Update(). The collections
can either be manipulated or replaced completely. Any changes are saved
immediately.

This is the place for a discussion about the API to manipulate push/fetch refspecs. In the end, there should be two options:

* Manipulate the git config, i.e. write the changes to disk
* Create a temporary remote based on an existing one, change some refspecs, and use that for a push/pull operation.

The second option requires a lot of changes, because libgit2sharp currently creates a `RemoteSafeHandle` based on a remote name in many places (e.g. in `Network.Fetch`).

As the first option should be relatively simple to implement, I only addressed this one.

I extended the `RemoteUpdater` instead of `RefSpecCollection` because that way, the `Remote`s and its `RefSpecs` properties stay immutable.

The native methods are not implemented yet, because I do not know how to marshal a [`git_strarray`](http://libgit2.github.com/libgit2/#HEAD/type/git_strarray). Any support would be greatly appreciated.