How to show Git output in output view?

I’m looking for a way to get Theia to show the output of git operations in the Ouout view. In VSC, this is possible, but I can’t see the git entry in the Output window drop down in Theia.

[original thread by kyuz0]

@kyuz0 if you are using the @theia/git extension for git support then there is no logging to the output-view at the moment (issue: https://github.com/eclipse-theia/theia/issues/601). However, the git builtin extensions (vscode-builtin-git, and vscode-builtin-git-ui) do provide output to the output-view:

"vscode-builtin-git": "https://open-vsx.org/api/vscode/git/1.39.1/file/vscode.git-1.39.1.vsix",
"vscode-builtin-git-ui": "https://open-vsx.org/api/vscode/git-ui/1.39.1/file/vscode.git-ui-1.39.1.vsix"

[kyuz0]

thanks! I have installed them, but now sure how they are triggered, it seems to still be using the wrong one

@kyuz0 are you running an application from sources (the repository) or are you using a custom application?
In general, in order to include the two vscode extensions you must:

  • make sure to remove @theia/git from your application

  • make sure to include the necessary theia extensions for plugin support (ex: @theia/plugin-ext-vscode)

  • reference the two plugins in your package.json under the theiaPlugins property (https://github.com/eclipse-theia/theia/blob/master/package.json#L82)

  • make sure to fetch the plugins (ex: yarn download:plugins)

This will add the two extensions to your application, and you should see the contribution in the output-view.
Please don’t hesitate to ask if you additional questions. You may also reference the folowing wiki.

[kyuz0]

root INFO [hosted-plugin: 583] PLUGIN_HOST(583): PluginManagerExtImpl/loadPlugin(/home/theia/.theia/extensions/vscode.git-1.44.2/extension/dist/main)
root ERROR [hosted-plugin: 583] TypeError: Class extends value undefined is not a constructor or null
at Object. (/home/theia/.theia/extensions/vscode.git-1.44.2/extension/dist/main.js:1:148145)
at r (/home/theia/.theia/extensions/vscode.git-1.44.2/extension/dist/main.js:1:158)
at Object. (/home/theia/.theia/extensions/vscode.git-1.44.2/extension/dist/main.js:1:598944)
at r (/home/theia/.theia/extensions/vscode.git-1.44.2/extension/dist/main.js:1:158)
at Object. (/home/theia/.theia/extensions/vscode.git-1.44.2/extension/dist/main.js:1:162267)
at r (/home/theia/.theia/extensions/vscode.git-1.44.2/extension/dist/main.js:1:158)
at /home/theia/.theia/extensions/vscode.git-1.44.2/extension/dist/main.js:1:957
at Object. (/home/theia/.theia/extensions/vscode.git-1.44.2/extension/dist/main.js:1:967)
at Module._compile (internal/modules/cjs/loader.js:778:30)
at Object.Module._extensions…js (internal/modules/cjs/loader.js:789:10)

@kyuz0 please use the version of the builtin I referenced, I believe the newer one is not yet supported and causes some issues.

[kyuz0]

thanks, that did work! I now have double controls, I guess I need to investigate a way to disable the theia one

[kyuz0]

I feel I’m being thick, my expectation is that there would be a setting to disable theia’s one

@kyuz0 no problem, and yes as I’ve mentioned you’ll need to remove @theia/git from your application (referenced in the package.json) and rebuild.

[kyuz0]

@vince-fugnitto thanks a lot for your help, I was able to get this to work!