4 #define DEFAULT_DELTA_CACHE_SIZE (256 * 1024 * 1024)
7 struct pack_idx_entry idx
;
8 unsigned long size
; /* uncompressed size */
9 struct packed_git
*in_pack
; /* already in pack */
11 struct object_entry
*delta
; /* delta base object */
12 struct object_entry
*delta_child
; /* deltified objects who bases me */
13 struct object_entry
*delta_sibling
; /* other deltified objects who
14 * uses the same base as me
16 void *delta_data
; /* cached delta (uncompressed) */
17 unsigned long delta_size
; /* delta data size (uncompressed) */
18 unsigned long z_delta_size
; /* delta data size (compressed) */
19 enum object_type type
;
20 enum object_type in_pack_type
; /* could be delta */
21 uint32_t hash
; /* name hint hash */
22 unsigned int in_pack_pos
;
23 unsigned char in_pack_header_size
;
24 unsigned preferred_base
:1; /*
25 * we do not pack this, but is available
26 * to be used as the base object to delta
29 unsigned no_try_delta
:1;
30 unsigned tagged
:1; /* near the very tip of refs */
31 unsigned filled
:1; /* assigned write-order */
34 * State flags for depth-first search used for analyzing delta cycles.
36 * The depth is measured in delta-links to the base (so if A is a delta
37 * against B, then A has a depth of 1, and B a depth of 0).
48 struct object_entry
*objects
;
49 uint32_t nr_objects
, nr_alloc
;
55 struct object_entry
*packlist_alloc(struct packing_data
*pdata
,
56 const unsigned char *sha1
,
59 struct object_entry
*packlist_find(struct packing_data
*pdata
,
60 const unsigned char *sha1
,
63 static inline uint32_t pack_name_hash(const char *name
)
71 * This effectively just creates a sortable number from the
72 * last sixteen non-whitespace characters. Last characters
73 * count "most", so things that end in ".c" sort together.
75 while ((c
= *name
++) != 0) {
78 hash
= (hash
>> 2) + (c
<< 24);