-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Unable to merge tracking into base: file name too long #29907
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
Comments
https://serverfault.com/questions/9546/filename-length-limits-on-linux |
This was added in #29389 which is not correct enough.
But the definition of this maxlength was 500 from long long ago, and this doesn't make sense as the max path length is 4096 in linux and for windows, it depends on the version: |
The normal file system should allow file path length below 256? |
Updated my comment above |
git config core.longpaths true |
This may work in Windows, as Windows don't have file name length limit. |
Is that a windows-specific option? I don't find it on https://git-scm.com/docs/git-config. |
I just tested GH web editor, the filename can be longer than 255. |
Quick/Partly fix #29907 In Linux and MacOS, by default the max file name length is 255. In windows, it depends on the version and settings, and has no file name length limitation, but has path length limitation. By default it is 260, considering path length is longer than filename, so I think it is ok to do this. For Windows, see https://learn.microsoft.com/windows/win32/fileio/maximum-file-path-limitation?tabs=registry For Linux, see https://github.com/torvalds/linux/blob/master/include/uapi/linux/limits.h#L12-L13 For MacOS, see https://discussions.apple.com/thread/254788848?sortBy=best
Quick/Partly fix go-gitea#29907 In Linux and MacOS, by default the max file name length is 255. In windows, it depends on the version and settings, and has no file name length limitation, but has path length limitation. By default it is 260, considering path length is longer than filename, so I think it is ok to do this. For Windows, see https://learn.microsoft.com/windows/win32/fileio/maximum-file-path-limitation?tabs=registry For Linux, see https://github.com/torvalds/linux/blob/master/include/uapi/linux/limits.h#L12-L13 For MacOS, see https://discussions.apple.com/thread/254788848?sortBy=best
Backport #30489 by @yp05327 Quick/Partly fix #29907 In Linux and MacOS, by default the max file name length is 255. In windows, it depends on the version and settings, and has no file name length limitation, but has path length limitation. By default it is 260, considering path length is longer than filename, so I think it is ok to do this. For Windows, see https://learn.microsoft.com/windows/win32/fileio/maximum-file-path-limitation?tabs=registry For Linux, see https://github.com/torvalds/linux/blob/master/include/uapi/linux/limits.h#L12-L13 For MacOS, see https://discussions.apple.com/thread/254788848?sortBy=best Co-authored-by: yp05327 <[email protected]>
I tried |
No, let's just set on a common denominator, e.g. 255. We want repos to be portable. |
Ok, I will close this issue. |
Backport go-gitea#30489 by @yp05327 Quick/Partly fix go-gitea#29907 In Linux and MacOS, by default the max file name length is 255. In windows, it depends on the version and settings, and has no file name length limitation, but has path length limitation. By default it is 260, considering path length is longer than filename, so I think it is ok to do this. For Windows, see https://learn.microsoft.com/windows/win32/fileio/maximum-file-path-limitation?tabs=registry For Linux, see https://github.com/torvalds/linux/blob/master/include/uapi/linux/limits.h#L12-L13 For MacOS, see https://discussions.apple.com/thread/254788848?sortBy=best Co-authored-by: yp05327 <[email protected]> (cherry picked from commit f52b1db)
Description
Update branch by merge
button, and press it, then you will get this error:Gitea Version
latest
Can you reproduce the bug on the Gitea demo site?
No
Log Gist
No response
Screenshots
No response
Git Version
No response
Operating System
No response
How are you running Gitea?
build
Database
None
The text was updated successfully, but these errors were encountered: