diff options
| author | Vicent Marti <tanoku@gmail.com> | 2011-02-28 12:46:13 +0200 |
|---|---|---|
| committer | Vicent Marti <tanoku@gmail.com> | 2011-03-03 20:23:52 +0200 |
| commit | 86d7e1ca6f54161a9e4d1ebe7a2f8e4802dc9639 (patch) | |
| tree | 88d9d0fc4a7dbeec37f863b47200c0c55e8ffcf4 /src/refs.c | |
| parent | 5de079b86dcf8744f71fa3d0bb496a2cf9b20c0d (diff) | |
| download | libgit2-86d7e1ca6f54161a9e4d1ebe7a2f8e4802dc9639.tar.gz | |
Fix searching in git_vector
We now store only one sorting callback that does entry comparison. This
is used when sorting the entries using a quicksort, and when looking for
a specific entry with the new search methods.
The following search methods now exist:
git_vector_search(vector, entry)
git_vector_search2(vector, custom_search_callback, key)
git_vector_bsearch(vector, entry)
git_vector_bsearch2(vector, custom_search_callback, key)
The sorting state of the vector is now stored internally.
Signed-off-by: Vicent Marti <tanoku@gmail.com>
Diffstat (limited to 'src/refs.c')
| -rw-r--r-- | src/refs.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/refs.c b/src/refs.c index f8da56154..542401c2f 100644 --- a/src/refs.c +++ b/src/refs.c @@ -751,7 +751,7 @@ static int packed_write(git_repository *repo) assert(repo && repo->references.packfile); total_refs = repo->references.packfile->key_count; - if ((error = git_vector_init(&packing_list, total_refs, packed_sort, NULL)) < GIT_SUCCESS) + if ((error = git_vector_init(&packing_list, total_refs, packed_sort)) < GIT_SUCCESS) return error; /* Load all the packfile into a vector */ |
