Skip to content
Snippets Groups Projects
Commit b0a22783 authored by Florian Heck's avatar Florian Heck
Browse files

restored behavior of merge prior to 6219ae01

parent 194ed866
No related branches found
No related tags found
No related merge requests found
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());
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment