libgit2/libgit2 — pull request #2295 by carlosmn (2014-04-24 12:14:23+00:00)
Title: fetchhead: deal with quotes in branch names

The current FETCH_HEAD parsing code assumes that a quote must end the
branch name. Git however allows for quotes as part of a branch name,
which causes us to consider the FETCH_HEAD file as invalid.

Instead of searching for a single quote char, search for a quote char
followed by SP, which is not a valid part of a ref name.

/cc @ethomson