aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDuarte Meneses <duarte.meneses@sonarsource.com>2017-09-25 13:24:58 +0200
committerDuarte Meneses <duarte.meneses@sonarsource.com>2017-09-28 09:14:43 +0200
commitf8b498ffbf09903b6d74d7ae3cb497cbe0789cc3 (patch)
tree728deb93fa40f4afaeff8164b81ef497c7aac10c
parent3dec1d76c61bb37e5fbc2394cae766c02dcf8a9d (diff)
downloadsonarqube-f8b498ffbf09903b6d74d7ae3cb497cbe0789cc3.tar.gz
sonarqube-f8b498ffbf09903b6d74d7ae3cb497cbe0789cc3.zip
SONAR-9837 Detect files changed in the current branch with SCM
-rw-r--r--sonar-scanner-engine/src/main/java/org/sonar/scanner/scm/ScmChangedFilesProvider.java2
1 files changed, 1 insertions, 1 deletions
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<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);