Skip to content

[BUG] Cloning prospector will fail due to long filename #744

@julianpollmann

Description

@julianpollmann

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:

  1. 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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions