You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have tried to add a large number of files in a single commit and keep getting ENAMETOOLONG error.
I checked and validated that any number of files above 384 files in a single command (add, commit) keep failing with this error.
code:"ENAMETOOLONG"
errno:"ENAMETOOLONG"
message:"spawn ENAMETOOLONG"
stack:"Error: spawn ENAMETOOLONG
at _errnoException (util.js:992:11)
at ChildProcess.spawn (internal/child_process.js:323:11)
at Object.exports.spawn (child_process.js:502:9)
at gitResponse.Promise (C:\Users\Gal\tmp\create-git-files\node_modules\simple-git\src\lib\git-executor.js:82:49)
at new Promise ()
at GitExecutor. (C:\Users\Gal\tmp\create-git-files\node_modules\simple-git\src\lib\git-executor.js:62:20)
at Generator.next ()
at __awaiter (C:\Users\Gal\tmp\create-git-files\node_modules\simple-git\src\lib\git-executor.js:8:71)
at new Promise ()
at __awaiter (C:\Users\Gal\tmp\create-git-files\node_modules\simple-git\src\lib\git-executor.js:4:12)"
syscall:"spawn"
The text was updated successfully, but these errors were encountered:
Hi, this error is system dependent and caused by referencing a file that has a file name that is too long, or where the overall character length of arguments sent to a spawned process exceed a maximum threshold.
See this stack overflow post for more details on what constitutes a name that is too long. Or this issue for details on argument length.
In either case, when you're attempting to add a large number of files at once, batching the files or adding them individually would improve the ability to decipher the problem from the error messages.
For example:
constfileList=readDir(somePath);for(constpathoffileList){(awaitgit.add(path)).catch(err=>console.error(`Could not add "${path}"`,err);}
I have tried to add a large number of files in a single commit and keep getting ENAMETOOLONG error.
I checked and validated that any number of files above 384 files in a single command (add, commit) keep failing with this error.
code:"ENAMETOOLONG"
errno:"ENAMETOOLONG"
message:"spawn ENAMETOOLONG"
stack:"Error: spawn ENAMETOOLONG
at _errnoException (util.js:992:11)
at ChildProcess.spawn (internal/child_process.js:323:11)
at Object.exports.spawn (child_process.js:502:9)
at gitResponse.Promise (C:\Users\Gal\tmp\create-git-files\node_modules\simple-git\src\lib\git-executor.js:82:49)
at new Promise ()
at GitExecutor. (C:\Users\Gal\tmp\create-git-files\node_modules\simple-git\src\lib\git-executor.js:62:20)
at Generator.next ()
at __awaiter (C:\Users\Gal\tmp\create-git-files\node_modules\simple-git\src\lib\git-executor.js:8:71)
at new Promise ()
at __awaiter (C:\Users\Gal\tmp\create-git-files\node_modules\simple-git\src\lib\git-executor.js:4:12)"
syscall:"spawn"
The text was updated successfully, but these errors were encountered: