]> git.ipfire.org Git - thirdparty/git.git/blobdiff - oid-array.c
hash_pos(): convert to oid_pos()
[thirdparty/git.git] / oid-array.c
index 889b311f22777deefb87d552c791b0538b6bcf0a..a19235afbf8408734b38eddea7ef5bf3fe29e673 100644 (file)
@@ -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, void *table)
 {
        struct object_id *array = table;
-       return array[index].hash;
+       return &array[index];
 }
 
 int oid_array_lookup(struct oid_array *array, const struct object_id *oid)
 {
        oid_array_sort(array);
-       return hash_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)