@@ -30,7 +30,8 @@ static int queue_has_nonstale(struct prio_queue *queue)
3030}
3131
3232/* all input commits in one and twos[] must have been parsed! */
33- static struct commit_list * paint_down_to_common (struct commit * one , int n ,
33+ static struct commit_list * paint_down_to_common (struct repository * r ,
34+ struct commit * one , int n ,
3435 struct commit * * twos ,
3536 int min_generation )
3637{
@@ -83,7 +84,7 @@ static struct commit_list *paint_down_to_common(struct commit *one, int n,
8384 parents = parents -> next ;
8485 if ((p -> object .flags & flags ) == flags )
8586 continue ;
86- if (parse_commit ( p ))
87+ if (repo_parse_commit ( r , p ))
8788 return NULL ;
8889 p -> object .flags |= flags ;
8990 prio_queue_put (& queue , p );
@@ -116,7 +117,7 @@ static struct commit_list *merge_bases_many(struct commit *one, int n, struct co
116117 return NULL ;
117118 }
118119
119- list = paint_down_to_common (one , n , twos , 0 );
120+ list = paint_down_to_common (the_repository , one , n , twos , 0 );
120121
121122 while (list ) {
122123 struct commit * commit = pop_commit (& list );
@@ -187,8 +188,8 @@ static int remove_redundant(struct commit **array, int cnt)
187188 if (array [j ]-> generation < min_generation )
188189 min_generation = array [j ]-> generation ;
189190 }
190- common = paint_down_to_common (array [i ], filled , work ,
191- min_generation );
191+ common = paint_down_to_common (the_repository , array [i ], filled ,
192+ work , min_generation );
192193 if (array [i ]-> object .flags & PARENT2 )
193194 redundant [i ] = 1 ;
194195 for (j = 0 ; j < filled ; j ++ )
@@ -322,7 +323,9 @@ int in_merge_bases_many(struct commit *commit, int nr_reference, struct commit *
322323 if (commit -> generation > min_generation )
323324 return ret ;
324325
325- bases = paint_down_to_common (commit , nr_reference , reference , commit -> generation );
326+ bases = paint_down_to_common (the_repository , commit ,
327+ nr_reference , reference ,
328+ commit -> generation );
326329 if (commit -> object .flags & PARENT2 )
327330 ret = 1 ;
328331 clear_commit_marks (commit , all_flags );
0 commit comments