use of git4idea.merge.GitMerger in project intellij-community by JetBrains.
the class GitMergeUpdater method doUpdate.
@Override
@NotNull
protected GitUpdateResult doUpdate() {
LOG.info("doUpdate ");
final GitMerger merger = new GitMerger(myProject);
MergeLineListener mergeLineListener = new MergeLineListener();
GitUntrackedFilesOverwrittenByOperationDetector untrackedFilesDetector = new GitUntrackedFilesOverwrittenByOperationDetector(myRoot);
String originalText = myProgressIndicator.getText();
myProgressIndicator.setText("Merging" + GitUtil.mention(myRepository) + "...");
try {
GitCommandResult result = myGit.merge(myRepository, assertNotNull(myTrackedBranches.get(myRoot).getDest()).getName(), asList("--no-stat", "-v"), mergeLineListener, untrackedFilesDetector, GitStandardProgressAnalyzer.createListener(myProgressIndicator));
myProgressIndicator.setText(originalText);
return result.success() ? GitUpdateResult.SUCCESS : handleMergeFailure(mergeLineListener, untrackedFilesDetector, merger, result.getErrorOutputAsJoinedString());
} catch (ProcessCanceledException pce) {
cancel();
return GitUpdateResult.CANCEL;
}
}
Aggregations