libgit2/libgit2 — pull request #1914 by carlosmn (2013-10-26 15:40:45+00:00)
Title: Handle fetches with no refspecs

When we fetch from a refspecless remote, we need to download its `HEAD`, and we need to write out a FETCH_HEAD for it.

A lot of the code in the last commit is there to avoid adding a refspec to the user's remote. Although that would simplify the code (as we wouldn't have to special-case 0 refspecs in so many places), changing the public data in a user's object is not something I'm comfortable with.