Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some commands still don't support long paths under Windows #1710

Closed
1 task done
grv87 opened this issue Jun 6, 2018 · 2 comments
Closed
1 task done

Some commands still don't support long paths under Windows #1710

grv87 opened this issue Jun 6, 2018 · 2 comments

Comments

@grv87
Copy link

grv87 commented Jun 6, 2018

  • I was not able to find an open or closed issue matching what I'm seeing

  • Which version of Git for Windows are you using? Is it 32-bit or 64-bit?

git version 2.17.1.windows.2
cpu: x86_64
built from commit: a60968cf435951d9411fc0f980a2e362d5cccea2
sizeof-long: 4
  • Which version of Windows are you running? Vista, 7, 8, 10? Is it 32-bit or 64-bit?
Microsoft Windows [Version 6.1.7601]
  • What options did you set as part of the installation? Or did you choose the
    defaults?
Editor Option: VIM
Path Option: Cmd
SSH Option: OpenSSH
CURL Option: OpenSSL
CRLF Option: CRLFAlways
Bash Terminal Option: MinTTY
Performance Tweaks FSCache: Enabled
Use Credential Manager: Enabled
Enable Symlinks: Enabled
  • Any other interesting things about your environment that might be related
    to the issue you're seeing?

core.longpaths config is set to true

Details

While there was msysgit#122, some git commands still don't work correctly with long paths under Windows.
I found problems with 2 commands:

  1. git init - error, when current directory name + filename became longer than MAX_PATH
  2. git push to (bare) repository located in local directory

Working examples:
https://gist.github.com/grv87/90e72ac5d6b5964f16c3de6f1ec4fb05
(Written in Go, since it is one of few languages that correctly works with Windows long paths, since Go 1.8).
Run with:

go run test-init.go
go run test-push.go
  • What actually happened instead?

For init:

fatal: unable to access 'q:/Temp/Basil/AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA/config': Filename too long
2018/06/07 00:54:02 exit status 128

For push:

fatal: The remote end hung up unexpectedly
fatal: The remote end hung up unexpectedly
2018/06/07 00:47:24 exit status 128
@dscho
Copy link
Member

dscho commented Jun 28, 2018

Unfortunately, I do not have a working go, so this example is anything but minimal for me.

@dscho
Copy link
Member

dscho commented Jun 28, 2018

@grv87 If you could spend some quality time with https://github.com/git-for-windows/git/blob/v2.18.0.windows.1/t/t7416-submodule-long-path.sh to teach it the init and push reproducers in the form of test_expect_failure, that would go a looong way to help accelerating the inner edit-debug cycle that I would then use to fix this bug.

Every question about these test cases that is not covered in https://github.com/git-for-windows/git/wiki/Adding-regression-tests: I am happy to answer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants