Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Increase limit of 5000 staged Git changes in Visual Studio Code

I have ~6000 stages changes in my Git project, and Visual Studio Code is showing only the first 5000 with a warning message:

The git repository has too many active changes, only a subset of Git features will be enabled

Is there a setting in Visual Studio Code to increase this limit from 5000 to 10000?

(Yes, I actually have ~6000 changed files. It's not an error.)

like image 610
rustyx Avatar asked Aug 02 '26 14:08

rustyx


2 Answers

See increased limit for Git changes in VS Code v1.61.

Increased the limit for the number of changed files that the Git extension can show

Prior to this release, the Git extension had a hard-coded limit of 5000 changes that it could show in the Source Control view. The limit was to prevent the user from having to wait for too long while we processed all the changes reported by Git. We've now increased this limit to 10,000 changes, and added a new git.statusLimit setting to allow users to customize the limit (per repository if desired). This setting can also be set to 0 to disable the limit completely, but be aware this could cause updates to take a very long time if there are lots of changes.

Additionally, we've added the following warning indicator on the input box when the limit has been exceeded.

Git change limit warning

like image 107
Mark Avatar answered Aug 05 '26 08:08

Mark


The 5000 limit seems to be hard coded in Visual Studio Code. See git.ts/getStatus():

getStatus(limit = 5000): Promise<{ status: IFileStatus[]; didHitLimit: boolean; }> {

which is invoked from updateModelState() without an argument, so the default 5000 is used:

const { status, didHitLimit } = await this.repository.getStatus();
like image 33
rustyx Avatar answered Aug 05 '26 09:08

rustyx



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!