libgit2/libgit2 — pull request #1196 by scunz (2013-01-06 13:39:46+00:00)
Title: Allow to clone repositories that don't have a `master` branch

Before this, we error out from `reference_matches_remote_head` if the reference we're searching for does not exist.
Since we explicitly check if master is existing in `update_head_to_remote` and error out if it doesn't, a repository without master branch could not be cloned.
In fact this was later clobbered by what is fixed in #1194.

However, this patch introduces a `found` member in `head_info` and sets it accordingly. That also saves us from checking the string length of `branchname` a few times.