git-lfs icon indicating copy to clipboard operation
git-lfs copied to clipboard

Wrong paths about .lfsconfig in cygwin git

Open viric opened this issue 6 years ago • 8 comments

Using cygwin git with lfs (with proper auth, etc.), running "git lfs" reports an error about not being able to load the .lfsconfig if being in a subdirectory of a submodule. This is with git-lfs 2.4.0.

Here I'm in the src/ subdirectory of the git "submodule":

$ git lfs fetch
Error reading .lfsconfig: Error running git [config -l -f C:\project\submodule\.lfsconfig]: 'fatal: unable to read config file 'src/C:\project\submodule\.lfsconfig': No such file or directory' 'exit status 128'

Then git lfs fetch goes on, but fails to check for the existence of that file.

Maybe related to #1820, which claimed to fix cygwin paths.

viric avatar Mar 28 '18 13:03 viric

Hi @viric, thanks for letting me know. This definitely looks like a bug to me, and I have put this on my list of things to fix before the next release.

@sschuberth do you have any thoughts about testing under Cygwin on AppVeyor?

ttaylorr avatar Mar 29 '18 01:03 ttaylorr

@sschuberth do you have any thoughts about testing under Cygwin on AppVeyor?

Not really, as I try to avoid Cygwin where I can (in favor of MSYS2). However, as AppVeyor by default also has Cygwin installed, it should "only" be a matter of adding a matrix build with the PATH properly set up.

sschuberth avatar Mar 29 '18 09:03 sschuberth

it should "only" be a matter of adding a matrix build with the PATH properly set up.

Sounds good, I have given this a shot in: https://github.com/git-lfs/git-lfs/compare/appveyor-on-cygwin.

ttaylorr avatar Mar 30 '18 05:03 ttaylorr

That doesn't work as cygwin itself it not a command. Also, like I mentioned I'd recommend to use a matrix build to cleanly separate the MINGW64 / Cygwin builds. Here's something I'm playing with:

https://github.com/sschuberth/git-lfs/tree/appveyor-matrix-cygwin

sschuberth avatar Apr 01 '18 09:04 sschuberth

That doesn't work as cygwin itself it not a command.

Thanks, I am not a cygwin user myself, so the clarification is appreciated.

Also, like I mentioned I'd recommend to use a matrix build to cleanly separate the MINGW64 / Cygwin builds.

Would it make sense to separate the MINGW64 builds further based upon their Git version? I wonder if we could parallelize the set of integration runs that we do on PR updates in this way.

Here's something I'm playing with: [...]

Great; would you like to PR this? I think getting something open so we can see what is failing and where our attention is needed in terms of patching compatibility issues would be great.

ttaylorr avatar Apr 04 '18 05:04 ttaylorr

Great; would you like to PR this?

I'm not sure this is a good idea as I do not intend to finish this, sorry, and I do not want to create the impression I would be doing so. But feel free to cherry-pick / modify my commit and create a "WIP" PR yourself.

sschuberth avatar Apr 06 '18 13:04 sschuberth

I'm not sure this is a good idea as I do not intend to finish this, sorry, and I do not want to create the impression I would be doing so.

No worries. I don't have the time to take on full Cygwin support myself, which is why I asked. This is definitely something that I want to support in the future, but it will have to wait among other priorities.

ttaylorr avatar Apr 06 '18 21:04 ttaylorr

Using Windows applications from Cygwin is generally not going to work (due to the differences in the views of filesystem paths generally). Vice versa is just as unlikely too. Cygwin should have a git-lfs package built against the Cygwin runtime rather than trying to use a git-lfs built for Windows.

mathstuf avatar Oct 31 '18 20:10 mathstuf