@@ -116,27 +116,27 @@ struct object *lookup_object(const unsigned char *sha1)
116
116
* power of 2 (but at least 32). Copy the existing values to the new
117
117
* hash map.
118
118
*/
119
- #define grow_object_hash (r ) grow_object_hash_##r()
120
- static void grow_object_hash_the_repository (void )
119
+ static void grow_object_hash (struct repository * r )
121
120
{
122
121
int i ;
123
122
/*
124
123
* Note that this size must always be power-of-2 to match hash_obj
125
124
* above.
126
125
*/
127
- int new_hash_size = the_repository -> parsed_objects -> obj_hash_size < 32 ? 32 : 2 * the_repository -> parsed_objects -> obj_hash_size ;
126
+ int new_hash_size = r -> parsed_objects -> obj_hash_size < 32 ? 32 : 2 * r -> parsed_objects -> obj_hash_size ;
128
127
struct object * * new_hash ;
129
128
130
129
new_hash = xcalloc (new_hash_size , sizeof (struct object * ));
131
- for (i = 0 ; i < the_repository -> parsed_objects -> obj_hash_size ; i ++ ) {
132
- struct object * obj = the_repository -> parsed_objects -> obj_hash [i ];
130
+ for (i = 0 ; i < r -> parsed_objects -> obj_hash_size ; i ++ ) {
131
+ struct object * obj = r -> parsed_objects -> obj_hash [i ];
132
+
133
133
if (!obj )
134
134
continue ;
135
135
insert_obj_hash (obj , new_hash , new_hash_size );
136
136
}
137
- free (the_repository -> parsed_objects -> obj_hash );
138
- the_repository -> parsed_objects -> obj_hash = new_hash ;
139
- the_repository -> parsed_objects -> obj_hash_size = new_hash_size ;
137
+ free (r -> parsed_objects -> obj_hash );
138
+ r -> parsed_objects -> obj_hash = new_hash ;
139
+ r -> parsed_objects -> obj_hash_size = new_hash_size ;
140
140
}
141
141
142
142
void * create_object_the_repository (const unsigned char * sha1 , void * o )
0 commit comments