Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Git clone from file explorer when no workspace #8667

Closed
amiramw opened this issue Oct 26, 2020 · 10 comments
Closed

Git clone from file explorer when no workspace #8667

amiramw opened this issue Oct 26, 2020 · 10 comments
Labels
enhancement issues that are enhancements to current functionality - nice to haves help wanted issues meant to be picked up, require help vscode issues related to VSCode compatibility

Comments

@amiramw
Copy link
Member

amiramw commented Oct 26, 2020

Feature Description:

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

Vscode:
image

@vince-fugnitto vince-fugnitto added enhancement issues that are enhancements to current functionality - nice to haves help wanted issues meant to be picked up, require help labels Oct 26, 2020
@kittaakos
Copy link
Contributor

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

@vince-fugnitto
Copy link
Member

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.

@vince-fugnitto vince-fugnitto added the vscode issues related to VSCode compatibility label Oct 26, 2020
@amiramw
Copy link
Member Author

amiramw commented Oct 26, 2020

Is it contained in #7178?

@vince-fugnitto
Copy link
Member

Is it contained in #7178?

I believe so yes :)

@EstherPerelman
Copy link
Contributor

EstherPerelman commented Oct 29, 2020

@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

@vince-fugnitto
Copy link
Member

@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
Copy link
Contributor

EstherPerelman commented Oct 29, 2020

@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

@amiramw
Copy link
Member Author

amiramw commented Oct 29, 2020

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
Copy link
Member

@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.

@amiramw
Copy link
Member Author

amiramw commented Mar 21, 2021

After support to welcome views and adoption of builtin git this feature works. Closing.

@amiramw amiramw closed this as completed Mar 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement issues that are enhancements to current functionality - nice to haves help wanted issues meant to be picked up, require help vscode issues related to VSCode compatibility
Projects
None yet
Development

No branches or pull requests

4 participants