VS Code - increase limit of 5000 staged Git changes

Viewed 1681

I have ~6000 stages changes in my Git project, and VS 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

Question: is there a setting in VS Code to increase this limit from 5000 to 10000?

(yes, I actually have ~6000 changed files, it's not an error)

2 Answers

See increased limit for git changes in vscode 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

The 5000 limit seems to be hard-coded in VS 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();
Related