diff options
Diffstat (limited to 'src/index.c')
-rw-r--r-- | src/index.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/index.c b/src/index.c index 007f19a43..128dd18cf 100644 --- a/src/index.c +++ b/src/index.c @@ -835,7 +835,9 @@ unsigned int git_index__prefix_position(git_index *index, const char *path) srch_key.path = path; srch_key.stage = 0; - git_vector_bsearch3(&pos, &index->entries, index->entries_search, &srch_key); + git_vector_sort(&index->entries); + git_vector_bsearch3( + &pos, &index->entries, index->entries_search, &srch_key); return pos; } |