Repository navigation
Commit 0533e5d
committed
fix(server): committing a large selection of files no longer fails with spawn E2BIG
A selected-file commit passed every path to `git add` as an argument, so a
large selection went over the OS argument limit and spawn threw E2BIG. That
synchronous throw became a defect instead of a GitCommandError, so the source
control action never settled in the client.
Send the selected pathspecs to `git add` on stdin with
`--pathspec-from-file=- --pathspec-file-nul`, and turn synchronous spawn
throws into a typed GitCommandError.
Fixes #35112
AI-assisted; verified with the tests and tools listed above.1 parent bf91048 commit 0533e5d
2 files changed
Lines changed: 38 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1909 | 1909 | | |
1910 | 1910 | | |
1911 | 1911 | | |
1912 | | - | |
| 1912 | + | |
1913 | 1913 | | |
1914 | 1914 | | |
1915 | 1915 | | |
| |||
1945 | 1945 | | |
1946 | 1946 | | |
1947 | 1947 | | |
| 1948 | + | |
| 1949 | + | |
| 1950 | + | |
| 1951 | + | |
| 1952 | + | |
| 1953 | + | |
| 1954 | + | |
| 1955 | + | |
| 1956 | + | |
| 1957 | + | |
| 1958 | + | |
| 1959 | + | |
| 1960 | + | |
| 1961 | + | |
| 1962 | + | |
| 1963 | + | |
| 1964 | + | |
| 1965 | + | |
| 1966 | + | |
| 1967 | + | |
| 1968 | + | |
| 1969 | + | |
1948 | 1970 | | |
1949 | 1971 | | |
1950 | 1972 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1003 | 1003 | | |
1004 | 1004 | | |
1005 | 1005 | | |
| 1006 | + | |
| 1007 | + | |
| 1008 | + | |
| 1009 | + | |
| 1010 | + | |
| 1011 | + | |
1006 | 1012 | | |
1007 | 1013 | | |
1008 | 1014 | | |
| |||
1018 | 1024 | | |
1019 | 1025 | | |
1020 | 1026 | | |
1021 | | - | |
1022 | | - | |
1023 | | - | |
1024 | | - | |
1025 | | - | |
1026 | | - | |
1027 | | - | |
1028 | | - | |
| 1027 | + | |
| 1028 | + | |
| 1029 | + | |
1029 | 1030 | | |
1030 | 1031 | | |
1031 | 1032 | | |
| |||
2521 | 2522 | | |
2522 | 2523 | | |
2523 | 2524 | | |
2524 | | - | |
2525 | | - | |
2526 | | - | |
| 2525 | + | |
| 2526 | + | |
| 2527 | + | |
| 2528 | + | |
| 2529 | + | |
| 2530 | + | |
2527 | 2531 | | |
2528 | 2532 | | |
2529 | 2533 | | |
| |||
0 commit comments