Re: [PATCH 1/2] symlinks: remove PATH_MAX limitation
From: Johannes Schindelin <hidden>
Date: 2016-06-15 23:01:49
Hi, On Sat, 5 Jul 2014, Karsten Blees wrote:
'git checkout' fails if a directory is longer than PATH_MAX, because the lstat_cache in symlinks.c checks if the leading directory exists using PATH_MAX-bounded string operations. Remove the limitation by using strbuf instead. Signed-off-by: Karsten Blees <redacted> --- This fixes a bug on Windows with long paths [1]. [1] https://github.com/msysgit/msysgit/issues/227
For context: on Windows, PATH_MAX is ridiculously small. And it really is that small, file functions of the Win32 API cannot handle longer paths. However, there is a (pretty ugly, if you ask me) workaround: prefixing the paths with "\\?\" and lo and behold, *many* (but not all) Win32 API functions can then handle paths up to something around 32,000 characters! The problem Karsten addressed here is caused exactly by this oddity: we *can* handle paths much longer than PATH_MAX. Therefore, we need to decouple the path buffers from that hardcoded limitation. Karsten, you rock. Ciao, Dscho -- -- *** Please reply-to-all at all times *** *** (do not pretend to know who is subscribed and who is not) *** *** Please avoid top-posting. *** The msysGit Wiki is here: https://github.com/msysgit/msysgit/wiki - Github accounts are free. You received this message because you are subscribed to the Google Groups "msysGit" group. To post to this group, send email to msysgit@googlegroups.com To unsubscribe from this group, send email to msysgit+unsubscribe@googlegroups.com For more options, and view previous threads, visit this group at http://groups.google.com/group/msysgit?hl=en_US?hl=en --- You received this message because you are subscribed to the Google Groups "msysGit" group. To unsubscribe from this group and stop receiving emails from it, send an email to msysgit+unsubscribe@googlegroups.com. For more options, visit https://groups.google.com/d/optout.