VS Code - 增加 5000 个分阶段 Git 更改的限制
VS Code - increase limit of 5000 staged Git changes
我的 Git 项目中有大约 6000 个阶段更改,而 VS Code 仅显示前 5000 个并带有警告消息:
The git repository has too many active changes, only a subset of Git features will be enabled
问题:VS Code 中是否有将此限制从 5000 增加到 10000 的设置?
(是的,我实际上有 ~6000 个更改的文件,这不是错误)
5000 的限制似乎是在 VS Code 中硬编码的,参见 git.ts/getStatus()
:
getStatus(limit = 5000): Promise<{ status: IFileStatus[]; didHitLimit: boolean; }> {
它是从 updateModelState()
调用的,没有参数,所以使用默认的 5000
:
const { status, didHitLimit } = await this.repository.getStatus();
参见 vscode v1.61 中的 increased limit for git changes。
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 项目中有大约 6000 个阶段更改,而 VS Code 仅显示前 5000 个并带有警告消息:
The git repository has too many active changes, only a subset of Git features will be enabled
问题:VS Code 中是否有将此限制从 5000 增加到 10000 的设置?
(是的,我实际上有 ~6000 个更改的文件,这不是错误)
5000 的限制似乎是在 VS Code 中硬编码的,参见 git.ts/getStatus()
:
getStatus(limit = 5000): Promise<{ status: IFileStatus[]; didHitLimit: boolean; }> {
它是从 updateModelState()
调用的,没有参数,所以使用默认的 5000
:
const { status, didHitLimit } = await this.repository.getStatus();
参见 vscode v1.61 中的 increased limit for git changes。
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.