libgit2/libgit2 — pull request #1493 by carlosmn (2013-04-20 17:25:20+00:00)
Title: Revamp the refspec handling

Finally add multiple refspec support in remotes and make the API less silly. It's been in its current form since the beginning, and it's showing its age.

There is no fine-grained refspec management, but I'd rather wait for a sensible use-case to figure out what to do. For now, you can clear them all or add and query per direction.

I expect `git_remote__matching_refspec` and its reverse to be made public later, possibly under better names depending on real-world usage.

This is all just in preparation for being able to load sloppy refspecs from config, which need much more complex rules.