Skip to content

git lfs pull does not work on long path (windows) #3772

@prusse-martin

Description

@prusse-martin

This is a problem observed on windows 10 machines.
Some of our repos have some long file names.
While running locally we have no problems since we use the default smudge filter and just do git clone ... / git checkout ... / ...
But on the CI we have the machines provisioned with git lfs install --skip-smudge --skip-repo --force and let jenkins do his stuff =).
Most builds doesn't have problems but since we add the branch name in the workspace folder name used once in a while some path hit the 260 windows limit.

When hitting long paths git lfs pull origin will output:

Could not check out "alfasim_data/initial_aaaaaaaaa_ssss/dddddddddddddd/initial-fffffffffffffffffffffffffffffffffffffffffffffffffffffffff.ext"
Could not check out "alfasim_data/initial_aaaaaaaaa_ssss/dddddddddddddd/initial-ggggggggggggggggggggggggggggggggggggggggggggggggggggggggg.ext"
...
Downloading LFS objects: 100% (146/146), 137 MB | 33 MB/s

Return 0 as error code and left the mentioned files unchanged.

Doing the same procedure using a short workspace folder name does not show problems.
Note that the error messages have been collected locally using makeshift names since jenkins itself show no outputs for this error and the jobs will just fail when some of those files are used.

With git lfs install --force clone and checkout will apply correctly the filters.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions