Patch Set 1:

If I get it right according to [1] EGit currently is matching native Git's behavior, so FWIW if we change this logic in EGit the corresponding change should be also done in native Git.

Anyway it's a heuristic approach as currently the Git transport protocol doesn't allow to disambiguate which branch is the default branch in the remote repository if more than one branch points at the same commit HEAD is referring to.

[1] http://dev.eclipse.org/mhonarc/lists/jgit-dev/msg01040.html