diff options
author | Russell Belfer <rb@github.com> | 2014-02-04 10:01:37 -0800 |
---|---|---|
committer | Russell Belfer <rb@github.com> | 2014-02-04 10:01:37 -0800 |
commit | 882c7742711199f757305687c257ac97262a3a30 (patch) | |
tree | 72de2a06120aa30875cde571454e77f4441d449c /src/index.c | |
parent | af4bc6615d9fe0ebcc4abb939273913bcf9aee60 (diff) | |
download | libgit2-882c7742711199f757305687c257ac97262a3a30.tar.gz |
Convert pqueue to just be a git_vector
This updates the git_pqueue to simply be a set of specialized
init/insert/pop functions on a git_vector.
To preserve the pqueue feature of having a fixed size heap, I
converted the "sorted" field in git_vectors to a more general
"flags" field so that pqueue could mix in it's own flag. This
had a bunch of ramifications because a number of places were
directly looking at the vector "sorted" field - I added a couple
new git_vector helpers (is_sorted, set_sorted) so the specific
representation of this information could be abstracted.
Diffstat (limited to 'src/index.c')
-rw-r--r-- | src/index.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/index.c b/src/index.c index 7bc5d5b24..1ab126c87 100644 --- a/src/index.c +++ b/src/index.c @@ -1564,7 +1564,7 @@ static int read_reuc(git_index *index, const char *buffer, size_t size) } /* entries are guaranteed to be sorted on-disk */ - index->reuc.sorted = 1; + git_vector_set_sorted(&index->reuc, true); return 0; } @@ -1610,7 +1610,7 @@ static int read_conflict_names(git_index *index, const char *buffer, size_t size #undef read_conflict_name /* entries are guaranteed to be sorted on-disk */ - index->names.sorted = 1; + git_vector_set_sorted(&index->names, true); return 0; } @@ -1812,7 +1812,7 @@ static int parse_index(git_index *index, const char *buffer, size_t buffer_size) #undef seek_forward /* Entries are stored case-sensitively on disk. */ - index->entries.sorted = !index->ignore_case; + git_vector_set_sorted(&index->entries, index->ignore_case); git_vector_sort(&index->entries); return 0; |