소스 검색

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>
tags/v5.9.0.202008260805-m3
David Pursehouse 3 년 전
부모
커밋
e342d6a2d8
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1
    1
      org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/internal/LfsConnectionFactory.java

+ 1
- 1
org.eclipse.jgit.lfs/src/org/eclipse/jgit/lfs/internal/LfsConnectionFactory.java 파일 보기

@@ -112,8 +112,8 @@ public class LfsConnectionFactory {
remoteUrl = config.getString(
ConfigConstants.CONFIG_KEY_REMOTE, remote,
ConfigConstants.CONFIG_KEY_URL);
break;
}
break;
}
if (lfsUrl == null && remoteUrl != null) {
try {

Loading…
취소
저장