jenkinsci/git-client-plugin — pull request #85 by MarkEWaite (2014-01-27 14:20:55+00:00)
Title: Fix JGit getDefaultRemote (deprecated) implementation to match CliGit

Added several tests in the deprecated test methods to assure the
implementations are consistent with one another.

The original JGit implementation used getNames() without using
a fully qualified name (like remote.origin.url) and was always
returning null. The new implementation uses getSubsections()
and returns useful values.

There is a variation between CliGitAPIImpl and JGitAPIImpl ordering
which is handled in the case where more than one remote is defined.
The javadoc for the CliGitAPIImpl says that it returns the first
remote defined, though it seems to actually return the last remote
defined. The JGitAPIImpl returns the first remote defined so that
it is consistent with the javadoc.