Skip to content

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

Closed
@grv87

Description

@grv87
  • 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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions