diff --git a/src/de/uni_passau/fim/seibt/gitwrapper/repo/Reference.java b/src/de/uni_passau/fim/seibt/gitwrapper/repo/Reference.java index ae967b18da6db238d6d2262de0f1399c19179c5d..dbe5d11895b93116cf2909f63acbdb4aaef78469 100644 --- a/src/de/uni_passau/fim/seibt/gitwrapper/repo/Reference.java +++ b/src/de/uni_passau/fim/seibt/gitwrapper/repo/Reference.java @@ -1,5 +1,7 @@ package de.uni_passau.fim.seibt.gitwrapper.repo; +import de.uni_passau.fim.seibt.gitwrapper.process.ProcessExecutor.ExecRes; + import java.util.Arrays; import java.util.List; import java.util.Objects; @@ -8,8 +10,6 @@ import java.util.function.Function; import java.util.logging.Logger; import java.util.stream.Collectors; -import de.uni_passau.fim.seibt.gitwrapper.process.ProcessExecutor.ExecRes; - public abstract class Reference { private static final Logger LOG = Logger.getLogger(Reference.class.getCanonicalName()); @@ -76,16 +76,7 @@ public abstract class Reference { } Optional<ExecRes> mergeBase = git.exec(repo.getDir(), "merge", "-n", "-q", other.getId()); - Function<ExecRes, Optional<Status>> toStatus = res -> { - if (git.failed(res)) { - LOG.warning(() -> String.format("Could not execute the merge between %s and %s.", this, other)); - return Optional.empty(); - } - - return repo.getStatus(); - }; - - return mergeBase.flatMap(toStatus); + return mergeBase.flatMap(res -> repo.getStatus()); }