Community
Participate
Working Groups
Reproducer: * Start Eclipse on a fresh workspace * Import an existing git repository in the Git repositories view (mine is a test repo that conveniently is already in rebase w/merge state). * Open the Git Staging view on that repo. * In the global preferences choose on the Diff/Merge page "External, use this tool" for the merge tool. On my Mac, the list presented is emerge, opendiff, vimdiff, vimdiff2, vimdiff3, with the first entry chosen by default (emerge). * Double click a conflicting file in the unstaged viewer of the Git Staging view. Expected: An error dialog that the emerge tool could not be started. Actual: Nothing happens, except the following error log: !ENTRY org.eclipse.egit.ui 2 0 2022-06-17 13:25:35.616 !MESSAGE Failed to run external merge tool. !STACK 0 org.eclipse.jgit.internal.diffmergetool.ToolException: External merge tool is not defined: none at org.eclipse.jgit.internal.diffmergetool.MergeTools.merge(MergeTools.java:161) at org.eclipse.egit.ui.internal.actions.MergeToolActionHandler.mergeModified(MergeToolActionHandler.java:197) at org.eclipse.egit.ui.internal.actions.MergeToolActionHandler.executeExternalToolForChildren(MergeToolActionHandler.java:138) at org.eclipse.egit.ui.internal.actions.MergeToolActionHandler.executeExternalToolForChildren(MergeToolActionHandler.java:134) at org.eclipse.egit.ui.internal.actions.MergeToolActionHandler.openMergeToolExternal(MergeToolActionHandler.java:123) at org.eclipse.egit.ui.internal.actions.MergeToolActionHandler.execute(MergeToolActionHandler.java:98) at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:283) at org.eclipse.ui.internal.handlers.E4HandlerProxy.execute(E4HandlerProxy.java:97) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:58) at org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(InjectorImpl.java:319) at org.eclipse.e4.core.internal.di.InjectorImpl.invoke(InjectorImpl.java:253) at org.eclipse.e4.core.contexts.ContextInjectionFactory.invoke(ContextInjectionFactory.java:173) at org.eclipse.e4.core.commands.internal.HandlerServiceHandler.execute(HandlerServiceHandler.java:156) at org.eclipse.core.commands.Command.executeWithChecks(Command.java:488) at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:487) at org.eclipse.e4.core.commands.internal.HandlerServiceImpl.executeHandler(HandlerServiceImpl.java:213) at org.eclipse.ui.internal.handlers.LegacyHandlerService.executeCommandInContext(LegacyHandlerService.java:440) at org.eclipse.egit.ui.internal.CommonUtils.runCommand(CommonUtils.java:218) at org.eclipse.egit.ui.internal.CommonUtils.runCommand(CommonUtils.java:182) at org.eclipse.egit.ui.internal.staging.StagingView.compareWith(StagingView.java:3105) at org.eclipse.jface.viewers.StructuredViewer$2.run(StructuredViewer.java:802) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45) at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:174) at org.eclipse.jface.viewers.StructuredViewer.fireOpen(StructuredViewer.java:799) at org.eclipse.jface.viewers.StructuredViewer.handleOpen(StructuredViewer.java:1118) at org.eclipse.jface.util.OpenStrategy.fireOpenEvent(OpenStrategy.java:275) at org.eclipse.jface.util.OpenStrategy.access$2(OpenStrategy.java:270) at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:310) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89) at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4443) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1512) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1535) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1520) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1324) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4229) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3839) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1157) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1046) at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:155) at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:644) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:551) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:156) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:152) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:401) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) at org.eclipse.equinox.launcher.Main.run(Main.java:1461) at org.eclipse.equinox.launcher.Main.main(Main.java:1434) There are three problems here: 1. The message claims no tool was selected. But the UI showed "emerge" to be active. Probably some initial setting is missing in the preferences. 2. The message is only logged; the user is not informed. 3. The Git Staging view shows three untracked files for the BASE, LOCAL, and REMOTE versions. Evidently they were created, then the tool run failed, and the files were not cleaned up.
Then continue: * Open the preference page again, choose "opendiff" as merge tool, then choose "emerge" again. Click "Apply". * Double-click the conflicting file in the Git Staging view again. Again, there's no user feedback, and the BASE, REMOTE, LOCAL files are not removed, but the error logged changes: ENTRY org.eclipse.egit.ui 2 0 2022-06-17 13:35:58.309 !MESSAGE Failed to run external merge tool. !STACK 0 org.eclipse.jgit.internal.diffmergetool.ToolException: JGit: tool execution return code: 1 checkExitCode: true execError: false stderr: emacs: standard input is not a tty at org.eclipse.jgit.internal.diffmergetool.CommandExecutor.run(CommandExecutor.java:84) at org.eclipse.jgit.internal.diffmergetool.MergeTools.merge(MergeTools.java:207) at org.eclipse.jgit.internal.diffmergetool.MergeTools.merge(MergeTools.java:165) at org.eclipse.egit.ui.internal.actions.MergeToolActionHandler.mergeModified(MergeToolActionHandler.java:197) at org.eclipse.egit.ui.internal.actions.MergeToolActionHandler.executeExternalToolForChildren(MergeToolActionHandler.java:138) at org.eclipse.egit.ui.internal.actions.MergeToolActionHandler.executeExternalToolForChildren(MergeToolActionHandler.java:134) at org.eclipse.egit.ui.internal.actions.MergeToolActionHandler.openMergeToolExternal(MergeToolActionHandler.java:123) at org.eclipse.egit.ui.internal.actions.MergeToolActionHandler.execute(MergeToolActionHandler.java:98) at org.eclipse.ui.internal.handlers.HandlerProxy.execute(HandlerProxy.java:283) at org.eclipse.ui.internal.handlers.E4HandlerProxy.execute(E4HandlerProxy.java:97) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at org.eclipse.e4.core.internal.di.MethodRequestor.execute(MethodRequestor.java:58) at org.eclipse.e4.core.internal.di.InjectorImpl.invokeUsingClass(InjectorImpl.java:319) at org.eclipse.e4.core.internal.di.InjectorImpl.invoke(InjectorImpl.java:253) at org.eclipse.e4.core.contexts.ContextInjectionFactory.invoke(ContextInjectionFactory.java:173) at org.eclipse.e4.core.commands.internal.HandlerServiceHandler.execute(HandlerServiceHandler.java:156) at org.eclipse.core.commands.Command.executeWithChecks(Command.java:488) at org.eclipse.core.commands.ParameterizedCommand.executeWithChecks(ParameterizedCommand.java:487) at org.eclipse.e4.core.commands.internal.HandlerServiceImpl.executeHandler(HandlerServiceImpl.java:213) at org.eclipse.ui.internal.handlers.LegacyHandlerService.executeCommandInContext(LegacyHandlerService.java:440) at org.eclipse.egit.ui.internal.CommonUtils.runCommand(CommonUtils.java:218) at org.eclipse.egit.ui.internal.CommonUtils.runCommand(CommonUtils.java:182) at org.eclipse.egit.ui.internal.staging.StagingView.compareWith(StagingView.java:3105) at org.eclipse.jface.viewers.StructuredViewer$2.run(StructuredViewer.java:802) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45) at org.eclipse.jface.util.SafeRunnable.run(SafeRunnable.java:174) at org.eclipse.jface.viewers.StructuredViewer.fireOpen(StructuredViewer.java:799) at org.eclipse.jface.viewers.StructuredViewer.handleOpen(StructuredViewer.java:1118) at org.eclipse.jface.util.OpenStrategy.fireOpenEvent(OpenStrategy.java:275) at org.eclipse.jface.util.OpenStrategy.access$2(OpenStrategy.java:270) at org.eclipse.jface.util.OpenStrategy$1.handleEvent(OpenStrategy.java:310) at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89) at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4443) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1512) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1535) at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1520) at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1324) at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:4229) at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3839) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1157) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338) at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1046) at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:155) at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:644) at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338) at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:551) at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:156) at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:152) at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134) at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:401) at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.base/java.lang.reflect.Method.invoke(Method.java:566) at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:653) at org.eclipse.equinox.launcher.Main.basicRun(Main.java:590) at org.eclipse.equinox.launcher.Main.run(Main.java:1461) at org.eclipse.equinox.launcher.Main.main(Main.java:1434) Hence my assumption that some initial preference setting is missing.
I'll take a look next week, thanks.
New Gerrit change created: https://git.eclipse.org/r/c/egit/egit/+/194301
Gerrit change https://git.eclipse.org/r/c/egit/egit/+/194301 was merged to [master]. Commit: http://git.eclipse.org/c/egit/egit.git/commit/?id=374b0cebe924f41bfeedb201be599eccd3e17ac3
Thomas, can you re-test?
Logs now correctly the error from comment 1. Interestingly I cannot reproduce the "temp files not cleaned up" bit anymore. Don't understand why. Of course there's still no user feedback.
New Gerrit change created: https://git.eclipse.org/r/c/egit/egit/+/194360
Gerrit change https://git.eclipse.org/r/c/egit/egit/+/194360 was merged to [master]. Commit: http://git.eclipse.org/c/egit/egit.git/commit/?id=2cb9c11092118901a634a745dfd0546683fa69fb