libgit2/libgit2 — pull request #2682 by carlosmn (2014-11-02 19:18:16+00:00)
Title: remote: check for the validity of the refspec when updating FETCH_HEAD

Before trying to rtransform using the given refspec to figure out what the name of the upstream branch is on the remote, we must make sure that the target of the refspec applies to the current branch's upstream.

From #2675