From f8b498ffbf09903b6d74d7ae3cb497cbe0789cc3 Mon Sep 17 00:00:00 2001 From: Duarte Meneses Date: Mon, 25 Sep 2017 13:24:58 +0200 Subject: [PATCH] SONAR-9837 Detect files changed in the current branch with SCM --- .../java/org/sonar/scanner/scm/ScmChangedFilesProvider.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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); -- 2.39.5