hbons / SparkleShare

Share and collaborate by syncing with any Git repository instantly. Linux, macOS, and Windows.
https://sparkleshare.org
Other
4.88k stars 576 forks source link

git commit "filename too long" on Windows - sync fails #1744

Open gerhard-tinned opened 7 years ago

gerhard-tinned commented 7 years ago

One of my clients is running SparkleShare on Windows. He reported recently problems with files that "don't sync" when copied into the SparkleShare folder.

The logfile revealed the following error message:

08:19:06 | Cmd | ShareName | git commit --all --message="...list of file names ..."
08:19:06 | Cmd | Couldn't execute command: Der Dateiname oder die Erweiterung ist zu lang

As this message is in German (German Windows version), here is my translation:

08:19:06 | Cmd | ShareName | git commit --all --message="...list of file names ..."08:19:06 | Cmd | Couldn't execute command: The filename or the file extension is too long

I have found a few notes on this issue. First, it seems to be a problem only on windows. It seems to effect the way git is compiled for/with the msys. See the links below.

https://stackoverflow.com/questions/22575662/filename-too-long-in-git-for-windows https://github.com/msysgit/git/pull/110 https://github.com/msysgit/msysgit/issues/52

From a quick look, it seems a fix has been provided about a year ago already. I was wondering if a new version with the fix could be released as a fix for my clients.

Thanks.

hbons commented 7 years ago

Yes, this is a known issue, but I didn't know there was a fix now. I'll try to include the fix in the next version. Meanwhile, if anyone can test that new git for Windows version that would be really helpful.

gerhard-tinned commented 7 years ago

Can you tell me how I can replace the git version on an already installed sparkleshare?

Please tell me as well which version of git you are planning to use so I can test exactly that version. (maybe provide a download link)

hbons commented 7 years ago

@gerhard-tinned should be in Program Files\SparkleShare\git? Just replace the whole folder with your Git copy.

gerhard-tinned commented 7 years ago

Seems not to be that easy. Maybe i did something wrong?

  1. In the sparkleshare programm directory I found a folder called "msysgit". msysgit states: "msysGit has been superseded by Git for Windows 2.x https://git-for-windows.github.io/"
  2. I installed in the system the git-scm.org version.
  3. I copied from the git-scm installation directory the "mingw64" directory as "msysgit" to the sparkleshare directory.
SparkleShare version: 1.4.0
Operating system:     Win32NT (Microsoft Windows NT 6.2.9200.0)
System.ComponentModel.Win32Exception: The system cannot find the file specified
   at System.Diagnostics.Process.StartWithCreateProcess(ProcessStartInfo startInfo)
   at System.Diagnostics.Process.Start()
   at SparkleShare.SparkleController.StartSSH()
   at SparkleShare.SparkleController.Initialize()
   at SparkleShare.Program.Main(String[] args)
gerhard-tinned commented 7 years ago

As it seems, it only works with the msysgit version 1.x but not with the version 2. The version 1.x seems to be outdated or not developed any more.

I am trying version Git-1.9.5-preview20150319 at the moment.

Side effect, up-to-date ciphers are finally supported.

gerhard-tinned commented 7 years ago

the msys git version "Git-1.9.5-preview20150319" could be added without any problems. The new version of git allowed to use the currently suggested ssh options while the SparkleShare 1.4 delivered version is not supporting the suggested secure ssh configuration.

As of this, a new version with the Git-1.9.5-preview20150319 should be published anyway.

I am still trying to verify the loong file/path names which i could not reproduce in a VM for testing. But I am about to test it on the PC it was reported on. I will provide an update hopefully soon.

Never the less, please consider publishing a new version with the updated git version anyway.

gerhard-tinned commented 7 years ago

@hbons, can you create a new build with the latest git version?

hbons commented 7 years ago

@gerhard-tinned I don't have a Windows box at the moment. Also Windows in master is currently broken due to build system changes, but I'll look into that soon. :)

gerhard-tinned commented 7 years ago

@hbons I also do not have a Windows machine. I used Virtualbox and downloaded a ready to use VM package directly from Microsoft.

gerhard-tinned commented 7 years ago

How can I help?

hbons commented 7 years ago

@BarryThePenguin could you test this new msysgit version on Windows?

romanshutsman commented 6 years ago

try this git config --system core.longpaths true

hbons commented 6 years ago

@romanshutsman Nice. Looks like this is a new setting? I'll add this to the default Git config in SparkleShare.

romanshutsman commented 6 years ago

@hbons no, it is available from v1.9.0 (2014)

hbons commented 6 years ago

@romanshutsman I see. It's not documented anywhere on the official website so I missed that...