Patch Set 1:

I believe this change mirrors a change made to JGit [1] to default to master if multiple advertised refs match HEAD. This matched up with the current behavior of CGit [2].

[1] https://github.com/eclipse/jgit/commit/899114f63c24223b697afb42e1564fc21a3b622d
[2] https://github.com/git/git/blob/master/remote.c#L1636