From b0a2278353760db3f742ea3ec9ee9f388f6ea558 Mon Sep 17 00:00:00 2001 From: Florian Heck <florian.heck@hotmail.de> Date: Thu, 20 Oct 2016 23:10:45 +0200 Subject: [PATCH] restored behavior of merge prior to 6219ae0 --- .../fim/seibt/gitwrapper/repo/Reference.java | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) 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 ae967b1..dbe5d11 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()); } -- GitLab