Re: Proposed function path_in_directory()

2012-10-08 Thread Junio C Hamano
Johannes Sixt writes: > Am 08.10.2012 18:13, schrieb Junio C Hamano: >> Michael Haggerty writes: >>> 2. Does there need to be any special related to DOS paths? >> >> The ceiling computation may need special case for dos. What does >> the getcwd() give us? Do we learn only the path within the

Re: Proposed function path_in_directory()

2012-10-08 Thread Johannes Sixt
Am 08.10.2012 18:13, schrieb Junio C Hamano: > Michael Haggerty writes: >> 2. Does there need to be any special related to DOS paths? > > The ceiling computation may need special case for dos. What does > the getcwd() give us? Do we learn only the path within the "current > drive" and need to p

Re: Proposed function path_in_directory()

2012-10-08 Thread Junio C Hamano
Michael Haggerty writes: > On 10/01/2012 06:51 AM, Michael Haggerty wrote: >> I think I would advocate that the prefix has to match the front of the >> path exactly (including any trailing slashes) and either >> >> strlen(prefix) == 0 >> or the prefix ended with a '/' >> or the prefi

Proposed function path_in_directory() [was: Re: [PATCH v2 8/9] longest_ancestor_length(): resolve symlinks before comparing paths]

2012-10-06 Thread Michael Haggerty
On 10/01/2012 06:51 AM, Michael Haggerty wrote: > I think I would advocate that the prefix has to match the front of the > path exactly (including any trailing slashes) and either > > strlen(prefix) == 0 > or the prefix ended with a '/' > or the prefix and path are identical > or t