File tree Expand file tree Collapse file tree 2 files changed +7
-8
lines changed Expand file tree Collapse file tree 2 files changed +7
-8
lines changed Original file line number Diff line number Diff line change @@ -139,20 +139,20 @@ static void grow_object_hash(struct repository *r)
139139 r -> parsed_objects -> obj_hash_size = new_hash_size ;
140140}
141141
142- void * create_object_the_repository ( const unsigned char * sha1 , void * o )
142+ void * create_object ( struct repository * r , const unsigned char * sha1 , void * o )
143143{
144144 struct object * obj = o ;
145145
146146 obj -> parsed = 0 ;
147147 obj -> flags = 0 ;
148148 hashcpy (obj -> oid .hash , sha1 );
149149
150- if (the_repository -> parsed_objects -> obj_hash_size - 1 <= the_repository -> parsed_objects -> nr_objs * 2 )
151- grow_object_hash (the_repository );
150+ if (r -> parsed_objects -> obj_hash_size - 1 <= r -> parsed_objects -> nr_objs * 2 )
151+ grow_object_hash (r );
152152
153- insert_obj_hash (obj , the_repository -> parsed_objects -> obj_hash ,
154- the_repository -> parsed_objects -> obj_hash_size );
155- the_repository -> parsed_objects -> nr_objs ++ ;
153+ insert_obj_hash (obj , r -> parsed_objects -> obj_hash ,
154+ r -> parsed_objects -> obj_hash_size );
155+ r -> parsed_objects -> nr_objs ++ ;
156156 return obj ;
157157}
158158
Original file line number Diff line number Diff line change @@ -93,8 +93,7 @@ extern struct object *get_indexed_object(unsigned int);
9393 */
9494struct object * lookup_object (const unsigned char * sha1 );
9595
96- #define create_object (r , s , o ) create_object_##r(s, o)
97- extern void * create_object_the_repository (const unsigned char * sha1 , void * obj );
96+ extern void * create_object (struct repository * r , const unsigned char * sha1 , void * obj );
9897
9998void * object_as_type (struct object * obj , enum object_type type , int quiet );
10099
You can’t perform that action at this time.
0 commit comments