summaryrefslogtreecommitdiff
path: root/pack-bitmap.c
diff options
context:
space:
mode:
authorLibravatar Jiang Xin <worldhello.net@gmail.com>2019-07-30 09:56:16 +0800
committerLibravatar Jiang Xin <worldhello.net@gmail.com>2019-07-30 09:56:16 +0800
commiteccd872c765a31cdbd9d7a7be6302bd19e736f9b (patch)
treea9b1fc5a7ebd0386c457a68bb85037ee65d9970f /pack-bitmap.c
parentl10n: de.po: Fix typo in German translation (diff)
parentGit 2.23-rc0 (diff)
downloadtgif-eccd872c765a31cdbd9d7a7be6302bd19e736f9b.tar.xz
Merge tag 'v2.23.0-rc0' of git://git.kernel.org/pub/scm/git/git
Git 2.23-rc0 * tag 'v2.23.0-rc0' of git://git.kernel.org/pub/scm/git/git: (420 commits) Git 2.23-rc0 Merge fixes made on the 'master' front Flush fixes up to the third batch post 2.22.0 The seventh batch git: mark cmd_rebase as requiring a worktree rebase: fix white-space xdiff: clamp function context indices in post-image grep: print the pcre2_jit_on value t6200: use test_commit_bulk travis-ci: build with GCC 4.8 as well The sixth batch clean: show an error message when the path is too long CodingGuidelines: spell out post-C89 rules README: fix rendering of text in angle brackets rm: resolving by removal is not a warning-worthy event transport-helper: avoid var decl in for () loop control stash: fix handling removed files with --keep-index mingw: support spawning programs containing spaces in their names gpg-interface: do not scan past the end of buffer tests: defang pager tests by explicitly disabling the log.mailmap warning ...
Diffstat (limited to 'pack-bitmap.c')
-rw-r--r--pack-bitmap.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/pack-bitmap.c b/pack-bitmap.c
index 6069b2fe55..ed2befaac6 100644
--- a/pack-bitmap.c
+++ b/pack-bitmap.c
@@ -365,7 +365,7 @@ struct include_data {
static inline int bitmap_position_extended(struct bitmap_index *bitmap_git,
const struct object_id *oid)
{
- khash_oid_pos *positions = bitmap_git->ext_index.positions;
+ kh_oid_pos_t *positions = bitmap_git->ext_index.positions;
khiter_t pos = kh_get_oid_pos(positions, *oid);
if (pos < kh_end(positions)) {
@@ -1041,7 +1041,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;
@@ -1057,13 +1057,13 @@ int rebuild_existing_bitmaps(struct bitmap_index *bitmap_git,
reposition = xcalloc(num_objects, sizeof(uint32_t));
for (i = 0; i < num_objects; ++i) {
- const unsigned char *sha1;
+ struct object_id oid;
struct revindex_entry *entry;
struct object_entry *oe;
entry = &bitmap_git->pack->revindex[i];
- sha1 = nth_packed_object_sha1(bitmap_git->pack, entry->nr);
- oe = packlist_find(mapping, sha1, NULL);
+ nth_packed_object_oid(&oid, bitmap_git->pack, entry->nr);
+ oe = packlist_find(mapping, &oid, NULL);
if (oe)
reposition[i] = oe_in_pack_pos(mapping, oe) + 1;
@@ -1080,9 +1080,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);
}