diff options
Diffstat (limited to 'oid-array.c')
-rw-r--r-- | oid-array.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/oid-array.c b/oid-array.c index 8e1bcedc0c..73ba76e9e9 100644 --- a/oid-array.c +++ b/oid-array.c @@ -1,6 +1,6 @@ #include "cache.h" #include "oid-array.h" -#include "sha1-lookup.h" +#include "hash-lookup.h" void oid_array_append(struct oid_array *array, const struct object_id *oid) { @@ -22,16 +22,16 @@ void oid_array_sort(struct oid_array *array) array->sorted = 1; } -static const unsigned char *sha1_access(size_t index, void *table) +static const struct object_id *oid_access(size_t index, const void *table) { - struct object_id *array = table; - return array[index].hash; + const struct object_id *array = table; + return &array[index]; } int oid_array_lookup(struct oid_array *array, const struct object_id *oid) { oid_array_sort(array); - return sha1_pos(oid->hash, array->oid, array->nr, sha1_access); + return oid_pos(oid, array->oid, array->nr, oid_access); } void oid_array_clear(struct oid_array *array) |