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

SCM: initialize git repo is weird #35031

Closed
bpasero opened this issue Sep 26, 2017 · 15 comments
Closed

SCM: initialize git repo is weird #35031

bpasero opened this issue Sep 26, 2017 · 15 comments
Assignees
Labels
bug Issue identified by VS Code Team member as probable bug git GIT issues verified Verification succeeded
Milestone

Comments

@bpasero
Copy link
Member

bpasero commented Sep 26, 2017

Testing: #34963

I am not sure I get this action:

image

I am being asked where to initialize the repository, but what if that path is outside of the opened workspace? Even worse, when I have no workspace open, I am still being asked, but then shouldn't we open that folder of the repo?

Imho this action should always init the git repo in one of the workspace folders and be disabled if no folder is opened. If multiple folders are opened, the user should be asked.

Also, this action is hidden as soon as any repository is shown but I might still want to "git init" in one of my workspace folders.

@bpasero bpasero added the under-discussion Issue is under discussion for relevance, priority, approach label Sep 26, 2017
@joaomoreno
Copy link
Member

Imho this action should always init the git repo in one of the workspace folders and be disabled if no folder is opened. If multiple folders are opened, the user should be asked.

👍

Also, this action is hidden as soon as any repository is shown but I might still want to "git init" in one of my workspace folders.

There's always the global command. The action is there just to catch your eye.

@joaomoreno joaomoreno added bug Issue identified by VS Code Team member as probable bug scm General SCM compound issues and removed under-discussion Issue is under discussion for relevance, priority, approach labels Sep 27, 2017
@joaomoreno joaomoreno added this to the September 2017 milestone Sep 27, 2017
@joaomoreno joaomoreno added git GIT issues and removed scm General SCM compound issues labels Sep 27, 2017
@joaomoreno joaomoreno modified the milestones: September 2017, Backlog Sep 27, 2017
@joaomoreno
Copy link
Member

To keep the number of issues in our inbox on a manageable level, we're closing issues that have been on the backlog for a long time but haven't gained traction: We look at the number of votes the issue has received and the number of duplicates issues filed.

Thanks for your understanding. Happy coding!

@bpasero bpasero reopened this Nov 24, 2017
@joaomoreno
Copy link
Member

joaomoreno commented Nov 24, 2017

Git init now asks for a folder name to initialise in.

Also, you can still initialise after that action item is gone, since there is the global command.

What else do we want here?

@bpasero
Copy link
Member Author

bpasero commented Nov 25, 2017

@joaomoreno I think #35031 (comment) summarises my expected behaviour and I think you acknowledged that too.

@joaomoreno
Copy link
Member

Have you tried the action lately?

@bpasero
Copy link
Member Author

bpasero commented Nov 27, 2017

@joaomoreno yes:

Empty Workspace
The action is enabled and when I click it I am asked to pick a folder. Once I picked a folder, the viewlet shows changes from that folder. Once I reload the window, the SCM viewlet does not remember that.

Fix: Do not enable this action in empty workspace. It makes no sense unless you would also ask the user to actually open that folder in VS Code.

Folder Workspace
I already opened a folder so why am I being asked to pick a folder? And when I pick a folder that is not opened I end up with the same issue as for the "Empty Workspace" case.

Fix: pick the opened folder to initialise and do not ask.

Multi Root Workspace
I am asked again even though I already opened folders.

Fix: Show a picker of workspace folders that are part of my multi root workspace to select from. If the workspace is empty (= 0 root folders) the action should not be enabled at all.

@joaomoreno
Copy link
Member

On it. For the first, since we don't have contributable action enablement, I'll just have to hide it. Do you know of a context key I can listen to?

@joaomoreno joaomoreno modified the milestones: Backlog, November 2017 Nov 27, 2017
@bpasero
Copy link
Member Author

bpasero commented Nov 27, 2017

@joaomoreno as far as I know we currently have no context key that reflects the state of the workspace, but it would probably make sense to have it.

@joaomoreno
Copy link
Member

@bpasero What's the best place to put that?

@bpasero
Copy link
Member Author

bpasero commented Nov 27, 2017

@joaomoreno maybe in the workspace service itself.

@sandy081 what do you think? could be a layering problem though...

@sandy081
Copy link
Member

I think, having a context for workspace makes sense.
We cannot have it Workspace service but can be done in workbench?

@joaomoreno
Copy link
Member

@sandy081 Let's do it together tomorrow.

@bpasero
Copy link
Member Author

bpasero commented Nov 28, 2017

@sandy081 @joaomoreno there is a couple of context keys in workbench.ts already defined, so imho makes sense to add this one there too.

@joaomoreno
Copy link
Member

@bpasero Thanks!

joaomoreno added a commit that referenced this issue Nov 28, 2017
@joaomoreno
Copy link
Member

joaomoreno commented Dec 4, 2017

I already opened a folder so why am I being asked to pick a folder?

I'm leaving this picker. I've seen way too many users initializing their repo in their home folder just because they click that command. The dialog is there as a confirmation step.

Everything else is fixed.

@bpasero bpasero added the verified Verification succeeded label Dec 5, 2017
@vscodebot vscodebot bot locked and limited conversation to collaborators Jan 18, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue identified by VS Code Team member as probable bug git GIT issues verified Verification succeeded
Projects
None yet
Development

No branches or pull requests

3 participants