diff-tree: use new base_name_compare() helper function
authorLinus Torvalds <torvalds@ppc970.osdl.org>
Fri, 20 May 2005 16:11:46 +0000 (09:11 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Fri, 20 May 2005 16:11:46 +0000 (09:11 -0700)
This fixes diff-tree sorting of directories vs files (we used to
use just the regular cache_name_compare() which only works on
full file pathnames).

diff-tree.c

index 5559dd3d8f478e96c3786f34eec71aaba111f861..3bf8899873a3743eae9a541ec7829fdf20c22b19 100644 (file)
@@ -107,7 +107,7 @@ static int compare_tree_entry(void *tree1, unsigned long size1, void *tree2, uns
 
        pathlen1 = strlen(path1);
        pathlen2 = strlen(path2);
-       cmp = cache_name_compare(path1, pathlen1, path2, pathlen2);
+       cmp = base_name_compare(path1, pathlen1, mode1, path2, pathlen2, mode2);
        if (cmp < 0) {
                show_file("-", tree1, size1, base);
                return -1;