Commit 07d348776106d84d8a9d8dde65a1122e3cd4b076

Kirill A. Shutemov 2011-07-12T18:37:27

index: do not sort index before git_vector_bsearch2() git_vector_bsearch2() calls git_vector_sort(). No need to call it directly. Signed-off-by: Kirill A. Shutemov <kirill@shutemov.name>

1
2
3
4
5
6
7
8
9
10
11
12
diff --git a/src/index.c b/src/index.c
index b705420..225dd7a 100644
--- a/src/index.c
+++ b/src/index.c
@@ -494,7 +494,6 @@ int git_index_remove(git_index *index, int position)
 
 int git_index_find(git_index *index, const char *path)
 {
-	sort_index(index);
 	return git_vector_bsearch2(&index->entries, index_srch, path);
 }