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>
This commit is contained in:
brian m. carlson
2017-05-06 22:10:11 +00:00
committed by Junio C Hamano
parent bc83266abe
commit e6a492b7be
8 changed files with 89 additions and 69 deletions

2
pack.h
View File

@ -67,7 +67,7 @@ struct pack_idx_header {
* Common part of object structure used for write_idx_file
*/
struct pack_idx_entry {
unsigned char sha1[20];
struct object_id oid;
uint32_t crc32;
off_t offset;
};