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
Support nested repository discovery via depth limit setting #87888
Comments
FYI here's an actual example of a workspace with multiple repos like mentioned above. The workspace repo names completely mirror the folder structure and it's a maintenance burden keeping the workspace in sync with repo additions and removals which happen reasonably frequently. It would be nice to specify the search depth (e.g. 2 folder levels) and let VS Code find/update the repos e.g. on launch. I think this feature would be complementary to the list of hard-coded repos (folders) currently supported by the workspace file. |
A final comment. One way to implement this would be to support (I also see no reason why the search folder concept could not be later extended to allow detection of nested repos (up to search depth) with a boolean switch for allowing nested folders (repos). I do not need this but write it having looked at #37947.) |
Git currently only detects repositories which might be immediate children of the root folder. Would a setting to control the folder depth of searching for repos work for you? |
This is interesting, and I have been following #37947 and the behaviour I see is:
For my use case, I have a number of subfolders nested maybe 3 or 4 levels down, due to being autoloaded (e.g. php composer, npm node_modules) and as they are actively developed at that location it's good to have the git repo loaded. If vscode could search for all repositories in all folders regardless of whether it is already inside one, that would solve my use case, this issue, and #37947 . So @joaomoreno yes having the folder depth deeper would work and having a setting if required for performance, but it would have to also keep searching deeper for repos inside repos it finds. |
Absolutely, I think a limited search depth is totally appropriate. |
The rules of discovery for repos are:
We don't currently support this, it is tracked by #37947 |
I realise perhaps I can be more clear about what I am trying to suggest by this feature. The idea is to traverse a tree to detect repos/folders in a workspace via presence of (say):
This would save specifying folders manually in the It would allow e.g. addition and removal of repos in a workspace without a need to constantly change the Detection of nested repos would be a bonus feature but really auto-detection of folders in a non-nested arrangement is my main use case. |
We currently don't traverse a tree for performance reasons. That's why I asked whether a numeric depth limit setting would make sense. Let's go with that. |
This feature request is now a candidate for our backlog. The community has 60 days to upvote the issue. If it receives 20 upvotes we will move it to our backlog. If not, we will close it. To learn more about how we handle feature requests, please see our documentation. Happy Coding! |
Sure, traverse probably the wrong word as definitely understand the need for a search depth. |
Just leaving a note here. My issue (#82378) was closed as a duplicate and I think it might be this issue that was the duplicate. Let me know if I'm mistaken! The original issue was locked before anyone identified the actual duplicate issue. |
For information, Sourcetree on macOS has a feature for adding Repos via "Scan Directory". GitHub Desktop allows dragging in a directory of Repos but I don't think it will search sub-directories. The goal here is (ideally regular, automated) directory scanning to maintain an up-to-date Repo list and the avoidance of having to continually update |
@lszomoru Hi, is it possible to exclude |
The latest Insiders release contains a new setting - @mozhuanzuojing, yes, I think it makes sense to add another setting to control a list of folders that would be excluded from the repository scanning. |
This setting didn't solve it for me; i'm currently following (#37947), too. |
It would be great to be able to specify a root folder in the
.code-workspace
file and then VS Code automatically pick up the repo folders contained therein without needing them to be explicitly specified and updated in the.code-workpsace
file. This would allow repos to be added and removed far more easily.Combining this with #87887 could then allow e.g. the following
Main Folder
to be specified and immediately produce a workspace with appropriately grouped repos....The text was updated successfully, but these errors were encountered: