Merge branch '3.1.x'

This commit is contained in:
Ryan Baxter
2022-11-07 19:58:29 -05:00
2 changed files with 4 additions and 2 deletions

View File

@@ -264,7 +264,7 @@ public class JGitEnvironmentRepository extends AbstractScmEnvironmentRepository
if (this.defaultLabel.equals(label) && JGitEnvironmentProperties.MAIN_LABEL.equals(this.defaultLabel)
&& tryMasterBranch) {
logger.info("Could not refresh default label " + label, e);
logger.info("Will try to checkout master label instead.");
logger.info("Will try to refresh master label instead.");
version = refresh(JGitEnvironmentProperties.MASTER_LABEL);
}
else {

View File

@@ -179,9 +179,11 @@ public class MultipleJGitEnvironmentRepository extends JGitEnvironmentRepository
}
catch (Exception e) {
if (MultipleJGitEnvironmentProperties.MAIN_LABEL.equals(label) && isTryMasterBranch()) {
logger.info("Cannot find Environment with default label " + getDefaultLabel(), e);
logger.info("Will try to find Environment master label instead.");
candidate = getRepository(this, application, profile, MultipleJGitEnvironmentProperties.MASTER_LABEL);
return findOneFromCandidate(candidate, application, profile,
MultipleJGitEnvironmentProperties.MASTER_LABEL, includeOrigin);
MultipleJGitEnvironmentProperties.MASTER_LABEL, includeOrigin);
}
throw e;
}