I encountered this error when I wanted to install the pre-commit hook of prospector on Windows 11 with git 2.49. This will also occur when just cloning the repository.
To Reproduce Steps to reproduce the behavior:
- Clone prospector with git (git version 2.49.0.windows.1)
Results in following error:
Cloning into 'prospector'...
remote: Enumerating objects: 8885, done.
remote: Counting objects: 100% (742/742), done.
remote: Compressing objects: 100% (270/270), done.
remote: Total 8885 (delta 603), reused 481 (delta 471), pack-reused 8143 (from 4)
Receiving objects: 100% (8885/8885), 2.16 MiB | 14.76 MiB/s, done.
Resolving deltas: 100% (5557/5557), done.
fatal: cannot create directory at 'tests/finder/testdata/venvs/long_path_not_a_venv/long_path_not_a_venv/long_path_not_a_venv/long_path_not_a_venv/long_path_not_a_venv/long_path_not_a_venv/long_path_not_a_venv/long_path_not_a_venv/long_path_not_a_venv': Filename too long
warning: Clone succeeded, but checkout failed.
You can inspect what was checked out with 'git status'
and retry with 'git restore --source=HEAD :/'
On Windows git is not able to create long filepaths, if git is not configured with git config --system core.longpaths true
Configuring the longpath would work on my machine, but might fail for other systems when using pre-commit.
I encountered this error when I wanted to install the
pre-commithook of prospector on Windows 11 with git 2.49. This will also occur when just cloning the repository.To Reproduce Steps to reproduce the behavior:
Results in following error:
On Windows git is not able to create long filepaths, if git is not configured with
git config --system core.longpaths trueConfiguring the longpath would work on my machine, but might fail for other systems when using pre-commit.