electron/node

git clone fails because very long file name on windows

MareikeTaeubner opened this issue · 1 comments

  • Version: v9.8.0
  • Platform: Micrsosoft Windows 10 Pro, 10.0.16299 Build 16299, 64 Bit
  • Subsystem:

When cloning this project the following checkout does fail on windows if the current directory is a bit too far away from the root directory.

git clone https://github.com/electron/node.git
Cloning into 'node'...
remote: Counting objects: 365486, done.
remote: Compressing objects: 100% (32/32), done.
remote: Total 365486 (delta 372), reused 371 (delta 358), pack-reused 365096
Receiving objects: 100% (365486/365486), 243.00 MiB | 8.73 MiB/s, done.
Resolving deltas: 100% (282495/282495), done.
fatal: cannot create directory at 'deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/load-json-file/node_modules/parse-json/node_modules/error-ex/node_modules': Filename too long
warning: Clone succeeded, but checkout failed.
You can inspect what was checked out with 'git status'
and retry the checkout with 'git checkout -f HEAD'

There seems to be a quite long file name which is an issue:

fatal: cannot create directory at 'deps/npm/node_modules/libnpx/node_modules/yargs/node_modules/read-pkg-up/node_modules/read-pkg/node_modules/load-json-file/node_modules/parse-json/node_modules/error-ex/node_modules': Filename too long

You can solve this with git config --system core.longpaths true