Windows build - long path for files

Hello Travis Dev and other people that will read this post,

Congratulations for the Windows support !! :fireworks:

Even if it is in Early access stage, I would like to give you some feedback about a problem that I have encountered on Windows build.
For some context, I’ve tried to set up on the c++ windows environnement on Travis for the company I’m working for, and I have encountered a problem during the checkout of the repository in the windows build.

It seems that the environment can’t checkout files with a long path/filename with can occurs on some repositories. This is a recurring problem on git with windows, we already have faced it on our local machine, and we had to run the command git config --system core.longpaths true to fix the problem.

But on Travis, the repository is checked out early, so I don’t know how I can run the command git config --system core.longpaths true before the windows build start checking out our repository, or if you have to integrate this command line from your side of Travis.

I hope that I’ve been clear about the problem I’m facing.
Thanks again for your amazing work.

Thanks in advance for your time,
Xavier Jouvenot

2 Likes

Thanks for pointing this out.

According to https://ourcodeworld.com/articles/read/109/how-to-solve-filename-too-long-error-in-git-powershell-and-github-application-for-windows, the limit is 260 characters for git compiled with the older API. Seems that there is no downside to setting this config option to true, so we should do that universally.

3 Likes

@BanzaiMan is there currently any workaround for this? We are hitting the same exact issue and I don’t seem to be able to find anything on the matter other than this topic. We’ve been using the git config --system core.longpaths true as well and it’s working just fine on our machines so I don’t think there should be any issues with running it in the VM. Maybe there could be a parameter which you could set that applies it? Maybe something like this:

git:
  long_paths: true
1 Like

Hi,

We really need this for our project! Is there any ETA on this?

Martin

1 Like

Hi,

We are hitting the same issue. Can some body guide us how to overcome, it may be a workaround if the fix is not available yet. Details are given below

Build URL - https://travis-ci.com/openshift/odo/jobs/282981765#L13
Job URL - https://github.com/openshift/odo/pull/2549/files#diff-354f30a63fb0907d4ad57269548329e3R46

–Amit

We can use init attribute to fix it

init:
      - git config --system core.longpaths true

I don’t recall init as something we can use on Travis CI. Where did you find it?