git: Fix stage/unstage failure with a large number of files#47800
Merged
cole-miller merged 3 commits intozed-industries:mainfrom Jan 31, 2026
Merged
git: Fix stage/unstage failure with a large number of files#47800cole-miller merged 3 commits intozed-industries:mainfrom
cole-miller merged 3 commits intozed-industries:mainfrom
Conversation
Member
|
Thank you and nice find! My only worry with this is that we'll lose support for people with older git binaries on their system. Maybe we could use |
Contributor
Author
|
@cole-miller thanks! I added the fallback to the old command. Since |
Member
|
Thanks! |
cole-miller
added a commit
that referenced
this pull request
Feb 3, 2026
…47800)" (#48238) This reverts commit 839b4f1. This changed caused a regression on Windows (reproducer: have a repo with some unstaged changes to tracked files, and click `Commit Tracked`). cc @marcocondrache Release Notes: - N/A (nightly only)
adb-sh
pushed a commit
to adb-sh/zed
that referenced
this pull request
Feb 5, 2026
…ed-industries#47800)" (zed-industries#48238) This reverts commit 839b4f1. This changed caused a regression on Windows (reproducer: have a repo with some unstaged changes to tracked files, and click `Commit Tracked`). cc @marcocondrache Release Notes: - N/A (nightly only)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Git commands can fail when staging or unstaging a very large number of files because each file path is passed as a separate CLI argument. Once the argument list grows beyond the OS limit, git errors with Argument list too long (os error 7).
Since git 2.26, pathspecs can be read from stdin, which lets us avoid passing thousands of paths as arguments and bypass this limitation.
I looked for existing issues related to this but couldn’t find any.
Repro:
Release Notes: