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

Revert "Let git merge conflict count reflect the number of conflicts, not just...

Revert "Let git merge conflict count reflect the number of conflicts, not just the number of conflicting files"

The git merge gives no guarantees about the exit code (contrary to git merge-file)

This reverts commit 98e77491.
parent 98e77491
No related branches found
No related tags found
1 merge request!5Changes necessary for JDime wrapper script
......@@ -25,12 +25,7 @@ public class DefaultMergeStrategy implements MergeStrategy {
@Override
public Optional<Integer> merge(Reference left, Reference right) {
Optional<ProcessExecutor.ExecRes> mergeBase = repo.getGit().exec(repo.getDir(), "merge", "-n", "-q", right.getId());
return mergeBase.map(res -> {
if (res.exitCode >= 0 && res.exitCode < 128) {
return res.exitCode;
} else {
return null;
}});
return mergeBase.flatMap(res -> repo.getStatus().map(stat -> stat.unmerged.size()));
}
@Override
......
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