From: Duarte Meneses Date: Mon, 25 Sep 2017 11:24:58 +0000 (+0200) Subject: SONAR-9837 Detect files changed in the current branch with SCM X-Git-Tag: 6.6-RC1~186 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=f8b498ffbf09903b6d74d7ae3cb497cbe0789cc3;p=sonarqube.git SONAR-9837 Detect files changed in the current branch with SCM --- diff --git a/sonar-scanner-engine/src/main/java/org/sonar/scanner/scm/ScmChangedFilesProvider.java b/sonar-scanner-engine/src/main/java/org/sonar/scanner/scm/ScmChangedFilesProvider.java index a3f6737fa62..9a948df4c73 100644 --- a/sonar-scanner-engine/src/main/java/org/sonar/scanner/scm/ScmChangedFilesProvider.java +++ b/sonar-scanner-engine/src/main/java/org/sonar/scanner/scm/ScmChangedFilesProvider.java @@ -62,7 +62,7 @@ public class ScmChangedFilesProvider extends ProviderAdapter { @CheckForNull private static Collection loadChangedFilesIfNeeded(ScmConfiguration scmConfiguration, BranchConfiguration branchConfiguration, Path rootBaseDir) { - if (branchConfiguration.isShortLivingBranch()) { + if (branchConfiguration.isShortLivingBranch() && branchConfiguration.branchTarget() != null) { ScmProvider scmProvider = scmConfiguration.provider(); if (scmProvider != null) { Profiler profiler = Profiler.create(LOG).startInfo(LOG_MSG);