LfsConnectionFactory#getLfsUrl: Fix unconditional break in for-loop

When iterating over the remote URLs to find one that matches "origin",
it always exits after the first iteration whether it has found the
remote or not. The break should be inside the conditional block so
that it exits when "origin" is found, otherwise continues to iterate
over the remaining remote URLs.

Found by Sonar Lint.

Change-Id: Ic969e54071d1cf095334007c1c1bab6579044dd2
Signed-off-by: David Pursehouse <david.pursehouse@gmail.com>
This commit is contained in:
David Pursehouse 2020-06-26 17:18:08 +09:00
parent 14509f4cbb
commit e342d6a2d8
1 changed files with 1 additions and 1 deletions

View File

@ -112,8 +112,8 @@ private static String getLfsUrl(Repository db, String purpose,
remoteUrl = config.getString(
ConfigConstants.CONFIG_KEY_REMOTE, remote,
ConfigConstants.CONFIG_KEY_URL);
break;
}
break;
}
if (lfsUrl == null && remoteUrl != null) {
try {