Re: [PATCH 09/19] tree-diff.c: reserve space in "base" for pathname concatenation

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Dec 14, 2010 at 3:21 PM, Johannes Sixt <j.sixt@xxxxxxxxxxxxx> wrote:
> Am 12/14/2010 8:43, schrieb Nguyen Thai Ngoc Duy:
>> On Tue, Dec 14, 2010 at 2:32 PM, Johannes Sixt <j.sixt@xxxxxxxxxxxxx> wrote:
>>> Am 12/14/2010 6:32, schrieb Junio C Hamano:
>>>> Nguyen Thai Ngoc Duy <pclouds@xxxxxxxxx> writes:
>>>>
>>>>> All paths should not exceed PATH_MAX, right?
>>>>
>>>> Your PATH_MAX may be a lot shorter than the PATH_MAX on the system I
>>>> created my trees on that you are reading.
>>>
>>> And that is not just gray theory: On Windows, PATH_MAX is whopping 260
>>> characters!
>>
>> Does that mean Windows won't accept any path longer than that, or
>> PATH_MAX is defined just for fun?
>
> It is the limit for path names that we can have without MAJOR extra
> efforts. It is not a limit implied by the file system.

Just googled around and found this [1]. I'm going with strbuf so it
can be reallocated if necessary. A bit tricky because "base" can be
moved, but I think it's worth it.

[1] http://insanecoding.blogspot.com/2007/11/pathmax-simply-isnt.html
-- 
Duy
--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]