microsoft / vscode

Visual Studio Code
https://code.visualstudio.com
MIT License
164.87k stars 29.51k forks source link

Git - Untracked Folders #169253

Open lszomoru opened 1 year ago

lszomoru commented 1 year ago

In case of large monorepos there is significant performance difference between running git status -uall and git status. Depending on the value of the git.untrackedChanges setting, VS Code either uses git status -uall or git status -uno. Given the performance difference between those two commands want to explore a way to show untracked folders in the "Source Control" view, and have a setting that one can configure to automatically expand these folders or only expand them on demand.

//cc @digitarald

digitarald commented 1 year ago

Love that idea. Reducing it down to untracked folders would greatly simplify the untracked changes list and the actions users can do (stage, ignore, delete, etc).

lszomoru commented 1 year ago

I have been thinking a bit more about this, and introducing the concept of a "folder" in the "Source Control" view would be a larger undertaking. While we can go down that path, there is another approach that would give us the performance improvements while keeping the current user experience of always rendering files in the "Source Control" view: 1) Use git status on the git repository 2) Update our status parser to have the ability to detect untracked folders 3) In case of any untracked folders are detected call git status -uall folder1 folder2 folderN 4) Parse the output of the command and "merge" the resources into the original git status call

//cc @joaomoreno, @digitarald

lszomoru commented 1 year ago

We explored the idea of creating a new group called "Untracked Folders" but based on early feedback we have found that there are some very rough edges given the current vscode extension API. We have decided to table this effort for the time being while we better understand the changes that are needed to the vscode extension API to create a better user experience.