From: Linus Torvalds Date: Fri, 20 May 2005 16:19:06 GMT Subject: Re: "git-diff-tree -R A B == git-diff-tree B A"? Message-ID: In-Reply-To: On Fri, 20 May 2005, Linus Torvalds wrote: > > The sorting does _not_ just affect files/directories with the same names. > It affects files and directories that have the same _beginning_. Ok, I just pushed out a fix which should get this right (it introduces a new "base_name_compare()" function that knows about these subtleties). I guess we should add a proper ordering test for all these cases. There's: - exact same name, directory vs file - different length names, but same in the first characters - this one has the subcases of the next character sorting with '/' or '\0' depending on the type of the shorter filename. Your previous test handled only the simple "exact same name" case. Linus