I have a directory that is tracked by git
on linux and I copied it to mac OS. On git status
multiple files are untracked because of a filename: File name too long
error. One filename (with its relative path) is 393 characters. Isn't there a limit 4096 characters (except on Windows)? [Reference] My core.longpaths
setting is set to true. (Also so is core.precomposeunicode
set to true, but probably irrelevant). Any advice?
Asked
Active
Viewed 4,207 times
5

Community
- 1
- 1

Daniel Naftalovich
- 335
- 6
- 15
2 Answers
4
OS X has NAME_MAX
(bytes in a path name component) set to 255:
$ grep NAME_MAX /usr/include/sys/syslimits.h
#define NAME_MAX 255 /* max bytes in a file name */
#define CHARCLASS_NAME_MAX 14 /* max character class name size */
Is that 393 byte name a single component, or the entire path? (Example: "foo/bar/baz"
has 3 components that are each 3 bytes, and the entire path is 11 or 12 bytes depending on whether you count the terminating '\0'
. The NAME_MAX
constant here does not count a terminating '\0'
.)

torek
- 448,244
- 59
- 642
- 775
0
Other option is change symlink configuration for your project, and you don't need change system vars.
Use the console and use this commands:
- git clone https://github.com/xxx/xxx.git
- cd xxx
- git config --list
- git config core.symlinks false
- git checkout master
- git pull origin master
I take the answer from:
https://github.com/Urigo/IonicCLI-Meteor-WhatsApp/issues/4#issuecomment-382957742

Locoucla
- 61
- 3