libgit2/libgit2 — pull request #1586 by jamill (2013-05-15 18:53:06+00:00)
Title: Fetch should not fail when remote HEAD reference is not present locally

This fixes an issue when fetching and the HEAD reference of the remote does not exist locally. This can be hit if the HEAD reference is a direct reference or when only fetching tags, and the HEAD reference is not part of the updated references.

/cc @carlosmn