I faced a problem committing to a repository using the Gin client on Windows, after pulling it from G-node and reorganized the file tree.
When I tried to commit, Gin complained that "the file name is too long". I tried to fix the problem after reading this post on StackOverflow, but for whatever reason the error persisted.
Are there any other ways to tackle this?
I faced a problem committing to a repository using the Gin client on Windows, after pulling it from G-node and reorganized the file tree.
When I tried to commit, Gin complained that "the file name is too long". I tried to fix the problem after reading [this post on StackOverflow](https://stackoverflow.com/questions/22575662/filename-too-long-in-git-for-windows), but for whatever reason the error persisted.
Are there any other ways to tackle this?
Some comments in the discussion mention "other drawbacks" to enabling this, but I'm not sure what those are.
Another, more straightforward solution would be to move the repository higher in the filesystem hierarchy (for example, in C:\repos) to make the file paths shorter, in case you're working in a user home directory. If you're already near the root this wont help much.
Which version of git is your gin version using right now? (gin --version).
I believe enabling longpaths in the git config might not be enough. Did you also remove the maximum path length limitation in Windows?
https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file#maximum-path-length-limitation
This is only for Windows 10.
Some comments in the discussion mention "other drawbacks" to enabling this, but I'm not sure what those are.
Another, more straightforward solution would be to move the repository higher in the filesystem hierarchy (for example, in C:\repos) to make the file paths shorter, in case you're working in a user home directory. If you're already near the root this wont help much.
Which version of git is your gin version using right now? (`gin --version`).
Yes I tried them (editing registry, and moving the repository up), but it did not help.
But... I found that I had a bit outdated Gin bundle (v1.6).
I upgraded to Gin bundle v1.8 (git 2.21.0.windows.1, git-annex 7.20190508), and now things to work without any error!
Now it does not matter how deep I am in (it may be also because the LongPathsEnabled setting is still in place).
I may still have to explore what happens on what conditions (looks so mysterious to me), but it is solved now.
Thank you very much for your advice!
Yes I tried them (editing registry, and moving the repository up), but it did not help.
But... I found that I had a bit outdated Gin bundle (v1.6).
I upgraded to Gin bundle v1.8 (git 2.21.0.windows.1, git-annex 7.20190508), and **now things to work without any error**!
Now it does not matter how deep I am in (it may be also because the LongPathsEnabled setting is still in place).
I may still have to explore what happens on what conditions (looks so mysterious to me), but it is solved now.
Thank you very much for your advice!
That's good to hear. The v1.7 update of the GIN client was pretty big and it also included a big update for all the bundled dependencies. Thanks for the update on the situation!
That's good to hear. The v1.7 update of the GIN client was pretty big and it also included a big update for all the bundled dependencies. Thanks for the update on the situation!
I faced a problem committing to a repository using the Gin client on Windows, after pulling it from G-node and reorganized the file tree.
When I tried to commit, Gin complained that "the file name is too long". I tried to fix the problem after reading this post on StackOverflow, but for whatever reason the error persisted.
Are there any other ways to tackle this?
I believe enabling longpaths in the git config might not be enough. Did you also remove the maximum path length limitation in Windows? https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file#maximum-path-length-limitation
This is only for Windows 10.
Some comments in the discussion mention "other drawbacks" to enabling this, but I'm not sure what those are.
Another, more straightforward solution would be to move the repository higher in the filesystem hierarchy (for example, in C:\repos) to make the file paths shorter, in case you're working in a user home directory. If you're already near the root this wont help much.
Which version of git is your gin version using right now? (
gin --version
).Yes I tried them (editing registry, and moving the repository up), but it did not help.
But... I found that I had a bit outdated Gin bundle (v1.6). I upgraded to Gin bundle v1.8 (git 2.21.0.windows.1, git-annex 7.20190508), and now things to work without any error!
Now it does not matter how deep I am in (it may be also because the LongPathsEnabled setting is still in place).
I may still have to explore what happens on what conditions (looks so mysterious to me), but it is solved now. Thank you very much for your advice!
That's good to hear. The v1.7 update of the GIN client was pretty big and it also included a big update for all the bundled dependencies. Thanks for the update on the situation!