Merge branch 'bw/rebase-autostash-keep-current-branch'
[gitweb.git] / pack-bitmap.c
index 998133588ff60b4ee60e55fe87dd63d3a2459c71..e07c798879b7277797b093a3eac6b4aece9ee4d2 100644 (file)
@@ -709,9 +709,7 @@ struct bitmap_index *prepare_bitmap_walk(struct rev_info *revs)
                        else
                                object_list_insert(object, &wants);
 
-                       if (!tag->tagged)
-                               die("bad tag");
-                       object = parse_object_or_die(&tag->tagged->oid, NULL);
+                       object = parse_object_or_die(get_tagged_oid(tag), NULL);
                }
 
                if (object->flags & UNINTERESTING)
@@ -1041,7 +1039,7 @@ static int rebuild_bitmap(uint32_t *reposition,
 
 int rebuild_existing_bitmaps(struct bitmap_index *bitmap_git,
                             struct packing_data *mapping,
-                            khash_sha1 *reused_bitmaps,
+                            kh_oid_map_t *reused_bitmaps,
                             int show_progress)
 {
        uint32_t i, num_objects;
@@ -1063,7 +1061,7 @@ int rebuild_existing_bitmaps(struct bitmap_index *bitmap_git,
 
                entry = &bitmap_git->pack->revindex[i];
                nth_packed_object_oid(&oid, bitmap_git->pack, entry->nr);
-               oe = packlist_find(mapping, &oid, NULL);
+               oe = packlist_find(mapping, &oid);
 
                if (oe)
                        reposition[i] = oe_in_pack_pos(mapping, oe) + 1;
@@ -1080,9 +1078,9 @@ int rebuild_existing_bitmaps(struct bitmap_index *bitmap_git,
                        if (!rebuild_bitmap(reposition,
                                            lookup_stored_bitmap(stored),
                                            rebuild)) {
-                               hash_pos = kh_put_sha1(reused_bitmaps,
-                                                      stored->oid.hash,
-                                                      &hash_ret);
+                               hash_pos = kh_put_oid_map(reused_bitmaps,
+                                                         stored->oid,
+                                                         &hash_ret);
                                kh_value(reused_bitmaps, hash_pos) =
                                        bitmap_to_ewah(rebuild);
                        }