git source plugin: Fix check for remote existence

When checking whether a remote exists in the cached git repository, we
currently perform a substring match on the output of 'git remote'.
This fails when there is an existing remote name that contains the
name we're looking for.

This was fixed by the rewrite of git fetching in !1808, but that
change seems unsuitable for the stable 1.4 branch.

Instead, split the command output into a list and check that the
remote name is in the list.

Closes #1372.
1 file changed