Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Disable VS Code warning "submodules which won't be opened automatically"

Every time I open a repo with a lot of submodules on VS Code, I get a pop-up message like:

The 'rust-devel' repository has 15 submodules which won't be opened automatically. You can still open each one individually by opening a file within.

Is there any way to disable this?

like image 626
Noldorin Avatar asked Dec 14 '22 09:12

Noldorin


2 Answers

I didn't find a way to disable this warning. However there is a workaround: By increasing the Git: Detect Submodules Limit setting to a value higher than the number of submodules, the warning is not shown.

For example, this sets the limit to 30 via the VS Code settings.json file:

{
    "git.detectSubmodulesLimit": 30
}
like image 55
mplattner Avatar answered Dec 21 '22 23:12

mplattner


edit settings.json:

"git.detectSubmodules": false,
"git.detectSubmodulesLimit": 9999

The first one avoids the auto-detection, the second one gets rid of the warning. credit Probably best to set more reasonable in case 9999 may slow your machine. Couldn't seem to find any reasoning why the default is 10.

also see vs code defaults:

  // Controls whether to automatically detect git submodules.
  "git.detectSubmodules": true,

  // Controls the limit of git submodules detected.
  "git.detectSubmodulesLimit": 10,
like image 24
bristweb Avatar answered Dec 22 '22 00:12

bristweb