diff options
| author | Philip Kelley <phkelley@hotmail.com> | 2013-01-04 13:48:08 -0500 |
|---|---|---|
| committer | Philip Kelley <phkelley@hotmail.com> | 2013-01-04 13:48:08 -0500 |
| commit | 27fe6efe85ef11a3a765640065aa08156f130874 (patch) | |
| tree | c7381a47f3c2cbd2e9d7eb84bfe6b670ea42ff2c | |
| parent | 52ee071b358345c0c8e3d8548dcda8de65065ffb (diff) | |
| download | libgit2-27fe6efe85ef11a3a765640065aa08156f130874.tar.gz | |
Fix git_index sorting with core.ignorecase in git_index_read
| -rw-r--r-- | src/index.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/index.c b/src/index.c index d4568aaef..c04796875 100644 --- a/src/index.c +++ b/src/index.c @@ -1359,9 +1359,10 @@ static int parse_index(git_index *index, const char *buffer, size_t buffer_size) #undef seek_forward - /* force sorting in the vector: the entries are - * assured to be sorted on the index */ - index->entries.sorted = 1; + /* Entries are stored case-sensitively on disk. */ + index->entries.sorted = !index->ignore_case; + git_vector_sort(&index->entries); + return 0; } |
