diff --git a/src/de/uni_passau/fim/seibt/gitwrapper/repo/Repository.java b/src/de/uni_passau/fim/seibt/gitwrapper/repo/Repository.java
index 3769fee9619c7ab8619ce1591503d6b715f82423..a27a49b64e7db1a1edeaf227e1bb20865e6554b7 100644
--- a/src/de/uni_passau/fim/seibt/gitwrapper/repo/Repository.java
+++ b/src/de/uni_passau/fim/seibt/gitwrapper/repo/Repository.java
@@ -115,10 +115,13 @@ public class Repository {
                 return null;
             }
 
-            String[] lines = res.stdOut.split("[\\r?\\n]+");
+            String[] lines = res.stdOut.isEmpty() ? new String[] {} : res.stdOut.split("[\\r?\\n]+");
 
             LOG.fine(() -> String.format("Found %d merge commits in %s.", lines.length, this));
-            LOG.finer(() -> String.format("Merge commits are:%n%s", String.join(System.lineSeparator(), lines)));
+
+            if (lines.length > 0) {
+                LOG.finer(() -> String.format("Merge commits are:%n%s", String.join(System.lineSeparator(), lines)));
+            }
 
             return Arrays.stream(lines).map(this::getCommitUnchecked).collect(Collectors.toList());
         };