diff --git a/builtin/pack-objects.c b/builtin/pack-objects.c index 2a89666d89fe86..a5d82d3593622a 100644 --- a/builtin/pack-objects.c +++ b/builtin/pack-objects.c @@ -268,10 +268,13 @@ static struct oidmap configured_exclusions; static struct oidset excluded_by_config; static int use_full_name_hash; -static inline uint32_t pack_name_hash_fn(const char *name) +static inline uint64_t pack_name_hash_fn(const char *name) { if (use_full_name_hash) - return pack_full_name_hash(name); + /* Use name-hash as most-significant bits. */ + return (((uint64_t)pack_name_hash(name)) << 32) | + (uint64_t) pack_full_name_hash(name); + return pack_name_hash(name); } diff --git a/pack-objects.h b/pack-objects.h index 50097552d03f20..9d8e627248bd79 100644 --- a/pack-objects.h +++ b/pack-objects.h @@ -88,7 +88,7 @@ struct object_entry { struct pack_idx_entry idx; void *delta_data; /* cached delta (uncompressed) */ off_t in_pack_offset; - uint32_t hash; /* name hint hash */ + uint64_t hash; /* name hint hash */ unsigned size_:OE_SIZE_BITS; unsigned size_valid:1; uint32_t delta_idx; /* delta base object */