seen_objects_nr = 0;
}
-static uint32_t find_object_pos(const unsigned char *sha1)
+static uint32_t find_object_pos(const unsigned char *hash)
{
- struct object_entry *entry = packlist_find(writer.to_pack, sha1, NULL);
+ struct object_entry *entry = packlist_find(writer.to_pack, hash, NULL);
if (!entry) {
die("Failed to write bitmap index. Packfile doesn't have full closure "
- "(object %s is missing)", sha1_to_hex(sha1));
+ "(object %s is missing)", hash_to_hex(hash));
}
return oe_in_pack_pos(writer.to_pack, entry);
static struct stored_bitmap *store_bitmap(struct bitmap_index *index,
struct ewah_bitmap *root,
- const unsigned char *sha1,
+ const unsigned char *hash,
struct stored_bitmap *xor_with,
int flags)
{
stored->root = root;
stored->xor = xor_with;
stored->flags = flags;
- oidread(&stored->oid, sha1);
+ oidread(&stored->oid, hash);
hash_pos = kh_put_sha1(index->bitmaps, stored->oid.hash, &ret);
* because the SHA1 already existed on the map. this is bad, there
* shouldn't be duplicated commits in the index */
if (ret == 0) {
- error("Duplicate entry in bitmap index: %s", sha1_to_hex(sha1));
+ error("Duplicate entry in bitmap index: %s", hash_to_hex(hash));
return NULL;
}
fprintf(stderr, "Failed to reuse at %d (%016llx)\n",
reuse_objects, result->words[i]);
- fprintf(stderr, " %s\n", sha1_to_hex(sha1));
+ fprintf(stderr, " %s\n", hash_to_hex(sha1));
}
#endif