]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-9837 Detect files changed in the current branch with SCM
authorDuarte Meneses <duarte.meneses@sonarsource.com>
Mon, 25 Sep 2017 11:24:58 +0000 (13:24 +0200)
committerDuarte Meneses <duarte.meneses@sonarsource.com>
Thu, 28 Sep 2017 07:14:43 +0000 (09:14 +0200)
sonar-scanner-engine/src/main/java/org/sonar/scanner/scm/ScmChangedFilesProvider.java

index a3f6737fa6250a5e5d23ca6e50d268786a8eed45..9a948df4c731fa06ffaa61cb101447eec4b311ea 100644 (file)
@@ -62,7 +62,7 @@ public class ScmChangedFilesProvider extends ProviderAdapter {
 
   @CheckForNull
   private static Collection<Path> 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);