Re: Improve handling of "." and ".." in git-diff-*
- From
Alex Riesen <raa.lkml@gmail.com>
- Date
- Aug 23, 2005, 19:54 UTC
- Message-ID
- <81b0412b05082312542bd1ecc@mail.gmail.com>
- In-Reply-To
- <81b0412b050823124938d735bf@mail.gmail.com>
On 8/23/05, Alex Riesen <raa.lkml@gmail.com> wrote:
Show 6 quoted lines
> On 8/17/05, Linus Torvalds <torvalds@osdl.org> 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.