Am 08.10.2012 18:13, schrieb Junio C Hamano: > Michael Haggerty <mhagger@xxxxxxxxxxxx> 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 prefix C: (or D: or X:) ourselves if we really > want to tell C:\bin and D:\bin apart? We don't have to do that. getcwd() returns the drive letter. > Assuming that is the case, the ceiling computation would need a > helper function that hides the gory details of prefixing getcwd() > result with drive letter or whatever needed, and another that > normalizes the elements of the environment variables (I presume that > if an element in it without the drive prefix should be normalized to > add the current drive letter to it so that the normalized getcwd() > result can be compared with it). E.g. if the ceiling list is > "D:/a/b;/trash/" then getcwd() returning "/a" alone does not make it > outside the ceiling due to "D:/a/b"---our current drive must be "D" > for that pattern to kick in. The unqualified /trash would apply to > any drive. A component in an path list like GIT_CEILING_DIRECTORIES or PATH that does not contain the drive letter is a user error. Do not cater for it. It is more important to take into account that those components can contain backslash as directory separators, while our mingw_getcwd() returns forward slashes. -- Hannes -- 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