From: Johannes Sixt Date: Sat, 23 Jan 2010 13:09:29 GMT Subject: Re: [PATCH] Handle double slashes in make_relative_path() Message-ID: <201001231409.30706.j6t@kdbg.org> In-Reply-To: <201001231240.28138.robin.rosenberg@dewire.com> On Samstag, 23. Januar 2010, Robin Rosenberg wrote: > It seems this function does something unhealthy when you pass a path of the > form //server/share. On windows dropping the double // at the beginning > makes it a different path since // is the UNC prefix. There is no problem in practice. The function returns either the input unmodified, or it strips also at least one directory component, except when base is only "/" (or "//" or "///"...). I said in practice, because on Windows it does not make sense to invoke git with (literally) git --git-dir=//server/share/repo.git --work-tree=/ ... i.e., without a drive prefix before the slash of --work-tree. -- Hannes