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,
403
403
return collect_ambiguous (oid , data );
404
404
}
405
405
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 )
408
407
{
408
+ struct repository * sort_ambiguous_repo = ctx ;
409
409
int a_type = oid_object_info (sort_ambiguous_repo , a , NULL );
410
410
int b_type = oid_object_info (sort_ambiguous_repo , b , NULL );
411
411
int a_type_sort ;
@@ -434,10 +434,7 @@ static int sort_ambiguous(const void *a, const void *b)
434
434
435
435
static void sort_ambiguous_oid_array (struct repository * r , struct oid_array * a )
436
436
{
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 );
441
438
}
442
439
443
440
static enum get_oid_result get_short_oid (struct repository * r ,
You can’t perform that action at this time.
0 commit comments