From: Alex Riesen Date: Tue, 23 Aug 2005 19:54:55 GMT Subject: Re: Improve handling of "." and ".." in git-diff-* Message-ID: <81b0412b05082312542bd1ecc@mail.gmail.com> In-Reply-To: <81b0412b050823124938d735bf@mail.gmail.com> On 8/23/05, Alex Riesen wrote: > On 8/17/05, Linus Torvalds wrote: > > NOTE! This does _not_ handle ".." or "." in the _middle_ of a pathspec. If > > you have people who do > > BTW, could this (below) be useful for something? > Well, a bit of explanation is certainly missing, sorry. The code tries to emulate (on purely text level) the behaviour of chdir(2), including stopping at root, going back and forth and removing useless (not changing directory) parts like "/./". The file in the previous message can be tested with : gcc -DCHECK_PATHEXPAND patchexpand.c && ./aout Cheers, Alex Riesen. PS: Before anyone asked: the code is mine and free for any use.