From: Linus Torvalds Date: Fri, 20 May 2005 15:57:32 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 only correct way to do name sorting is the one that fsck does in > "verify_order()". To realize why, you need to realize that "A" (the > directory) sorts _after_ a filename "A file", because '/' sorts after ' '. > > In contrast, "A" (the directory) sorts _before_ "ABBA" (the band), because > '/' sorts before 'B'. Btw, in case you wonder: the real problem is that we use "cache_name_compare()" on a directory name. The function is (as the name says) designed for full pathnames, not the diff-tree kind of possibly partial basenames. Linus