summaryrefslogtreecommitdiff
path: root/pack-bitmap-write.c
diff options
context:
space:
mode:
authorbrian m. carlson <sandals@crustytoothpaste.net>2017-05-06 22:10:11 (GMT)
committerJunio C Hamano <gitster@pobox.com>2017-05-08 06:12:57 (GMT)
commite6a492b7beca9dc8b656f2be3aec23fc1a35e4de (patch)
tree15196180251faf3c1416aa460172872c194ab08d /pack-bitmap-write.c
parentbc83266abe36905cade4719cbaeb8a62d0a382da (diff)
downloadgit-e6a492b7beca9dc8b656f2be3aec23fc1a35e4de.zip
git-e6a492b7beca9dc8b656f2be3aec23fc1a35e4de.tar.gz
git-e6a492b7beca9dc8b656f2be3aec23fc1a35e4de.tar.bz2
pack: convert struct pack_idx_entry to struct object_id
Convert struct pack_idx_entry to use struct object_id by changing the definition and applying the following semantic patch, plus the standard object_id transforms: @@ struct pack_idx_entry E1; @@ - E1.sha1 + E1.oid.hash @@ struct pack_idx_entry *E1; @@ - E1->sha1 + E1->oid.hash Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'pack-bitmap-write.c')
-rw-r--r--pack-bitmap-write.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/pack-bitmap-write.c b/pack-bitmap-write.c
index e313f4f..8e47a96 100644
--- a/pack-bitmap-write.c
+++ b/pack-bitmap-write.c
@@ -73,7 +73,8 @@ void bitmap_writer_build_type_index(struct pack_idx_entry **index,
break;
default:
- real_type = sha1_object_info(entry->idx.sha1, NULL);
+ real_type = sha1_object_info(entry->idx.oid.hash,
+ NULL);
break;
}
@@ -96,7 +97,8 @@ void bitmap_writer_build_type_index(struct pack_idx_entry **index,
default:
die("Missing type information for %s (%d/%d)",
- sha1_to_hex(entry->idx.sha1), real_type, entry->type);
+ oid_to_hex(&entry->idx.oid), real_type,
+ entry->type);
}
}
}
@@ -459,7 +461,7 @@ static inline void dump_bitmap(struct sha1file *f, struct ewah_bitmap *bitmap)
static const unsigned char *sha1_access(size_t pos, void *table)
{
struct pack_idx_entry **index = table;
- return index[pos]->sha1;
+ return index[pos]->oid.hash;
}
static void write_selected_commits_v1(struct sha1file *f,