projects
/
git.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
958ba6c
)
diff-tree: use new base_name_compare() helper function
author
Linus Torvalds
<torvalds@ppc970.osdl.org>
Fri, 20 May 2005 16:11:46 +0000
(09:11 -0700)
committer
Linus 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
patch
|
blob
|
history
diff --git
a/diff-tree.c
b/diff-tree.c
index
5559dd3
..
3bf8899
100644
(file)
--- a/
diff-tree.c
+++ b/
diff-tree.c
@@
-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, pathlen
2);
+ cmp =
base_name_compare(path1, pathlen1, mode1, path2, pathlen2, mode
2);
if (cmp < 0) {
show_file("-", tree1, size1, base);
return -1;