File tree Expand file tree Collapse file tree 1 file changed +3
-6
lines changed
Expand file tree Collapse file tree 1 file changed +3
-6
lines changed Original file line number Diff line number Diff line change @@ -403,9 +403,9 @@ static int repo_collect_ambiguous(struct repository *r,
403403 return collect_ambiguous (oid , data );
404404}
405405
406- static struct repository * sort_ambiguous_repo ;
407- static int sort_ambiguous (const void * a , const void * b )
406+ static int sort_ambiguous (const void * a , const void * b , void * ctx )
408407{
408+ struct repository * sort_ambiguous_repo = ctx ;
409409 int a_type = oid_object_info (sort_ambiguous_repo , a , NULL );
410410 int b_type = oid_object_info (sort_ambiguous_repo , b , NULL );
411411 int a_type_sort ;
@@ -434,10 +434,7 @@ static int sort_ambiguous(const void *a, const void *b)
434434
435435static void sort_ambiguous_oid_array (struct repository * r , struct oid_array * a )
436436{
437- /* mutex will be needed if this code is to be made thread safe */
438- sort_ambiguous_repo = r ;
439- QSORT (a -> oid , a -> nr , sort_ambiguous );
440- sort_ambiguous_repo = NULL ;
437+ QSORT_S (a -> oid , a -> nr , sort_ambiguous , r );
441438}
442439
443440static enum get_oid_result get_short_oid (struct repository * r ,
You can’t perform that action at this time.
0 commit comments