Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"The command line is too long." on git.add() #201

Closed
cloewen8 opened this issue Oct 18, 2021 · 1 comment · Fixed by #202
Closed

"The command line is too long." on git.add() #201

cloewen8 opened this issue Oct 18, 2021 · 1 comment · Fixed by #202

Comments

@cloewen8
Copy link
Contributor

The Issue

When adding a large number of files (143), git.add will fail. I believe this would also happen with long path names as well.

As a temporary workaround, I will create a custom stream to flush a limited number of files at once.

A Solution (maybe)

I haven't worked with Streams for a while, so please disregard this if I am incorrect.
In Node.js 1.2.0, they added a simplified way to construct writable streams (https://nodejs.org/api/stream.html#stream_simplified_construction). If this was used instead of through2, writev could be implemented. writev is designed to write multiple chunks at once and would be better suited for the task. The amount written using pipe can be customized by setting highWaterMark (untested).

Assuming this is a viable solution, I would be happy to implement it and any applicable tests.

@stephenlacy
Copy link
Owner

PR would be accepted, thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants