Re: "git-diff-tree -R A B == git-diff-tree B A"?
- From
Linus Torvalds <torvalds@osdl.org>
- Date
- May 20, 2005, 16:19 UTC
- Message-ID
- <Pine.LNX.4.58.0505200913170.2206@ppc970.osdl.org>
- In-Reply-To
- <Pine.LNX.4.58.0505200844090.2206@ppc970.osdl.org>
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