Theia: Git clone from file explorer when no workspace

Created on 26 Oct 2020  路  9Comments  路  Source: eclipse-theia/theia

Feature Description:

Similar to vs code I would like to git clone a repo before opening any workspace.

Vscode:
image

enhancement help wanted vscode

All 9 comments

We should support the ViewsWelcomeExtensionPoint properly, and not do another hack as we did for the Open Workspace and Init Repository.

Some additional information regarding contributing welcome content. The clone repository welcome content is actually contributed through the builtin git extension and once the API is supported we can benefit from it's functionality.

Is it contained in #7178?

I believe so yes :)

@amiramw
For now the git.clone command in theia is enabled only if a workspace is opened
This is the code in git-contribution.ts:

    registry.registerCommand(GIT_COMMANDS.CLONE, {
            isEnabled: () => this.workspaceService.opened,
            execute: (url?: string, folder?: string, branch?: string) =>
                this.quickOpenService.clone(url, folder, branch)
        });

So supporting view-welcome for explorer will display the "clone repository" button disabled

@amiramw
For now the git.clone command in theia is enabled only if a workspace is opened
This is the code in git-contribution.ts:

@EstherPerelman the @theia/git extension does not contribute any welcome views, the support should come when using the builtin-git and builtin-git-ui vscode extensions which replace @theia/git.

@EstherPerelman the @theia/git extension does not contribute any welcome views, the support should come when using the builtin-git and builtin-git-ui vscode extensions which replace @theia/git.

@vince-fugnitto But in order to clone a repository in the explorer view we use the git.clone command

It is also implemented in the git builtin extension.
You can see those extensions here: https://open-vsx.org/?search=git&category=&sortBy=relevance&sortOrder=desc

I'm not sure the lastest versions work in theia.

@vince-fugnitto But in order to clone a repository in the explorer view we use the git.clone command

@EstherPerelman the git.clone command you referenced comes from @theia/git which should not be used alongside the builtin-git and builtin-git-ui vscode extensions (which provides the 'welcome-view'), these extensions replace @theia/git.

The builtin defines it's own git.clone command with a different when clause which you can view through it's sources.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kpge picture kpge  路  3Comments

vince-fugnitto picture vince-fugnitto  路  3Comments

jeanlucburot picture jeanlucburot  路  3Comments

marechal-p picture marechal-p  路  3Comments

akosyakov picture akosyakov  路  3Comments