99#include "run-command.h"
1010#include "bisect.h"
1111
12- static unsigned char (* skipped_sha1 )[20 ];
13- static int skipped_sha1_nr ;
14- static int skipped_sha1_alloc ;
12+ struct sha1_array {
13+ unsigned char (* sha1 )[20 ];
14+ int sha1_nr ;
15+ int sha1_alloc ;
16+ };
17+
18+ static struct sha1_array skipped_revs ;
1519
1620static const char * * rev_argv ;
1721static int rev_argv_nr ;
@@ -420,9 +424,9 @@ static int register_ref(const char *refname, const unsigned char *sha1,
420424 ALLOC_GROW (rev_argv , rev_argv_nr + 1 , rev_argv_alloc );
421425 rev_argv [rev_argv_nr ++ ] = good ;
422426 } else if (!prefixcmp (refname , "skip-" )) {
423- ALLOC_GROW (skipped_sha1 , skipped_sha1_nr + 1 ,
424- skipped_sha1_alloc );
425- hashcpy (skipped_sha1 [ skipped_sha1_nr ++ ], sha1 );
427+ ALLOC_GROW (skipped_revs . sha1 , skipped_revs . sha1_nr + 1 ,
428+ skipped_revs . sha1_alloc );
429+ hashcpy (skipped_revs . sha1 [ skipped_revs . sha1_nr ++ ], sha1 );
426430 }
427431
428432 return 0 ;
@@ -466,7 +470,8 @@ static int skipcmp(const void *a, const void *b)
466470
467471static void prepare_skipped (void )
468472{
469- qsort (skipped_sha1 , skipped_sha1_nr , sizeof (* skipped_sha1 ), skipcmp );
473+ qsort (skipped_revs .sha1 , skipped_revs .sha1_nr ,
474+ sizeof (* skipped_revs .sha1 ), skipcmp );
470475}
471476
472477static const unsigned char * skipped_sha1_access (size_t index , void * table )
@@ -477,7 +482,7 @@ static const unsigned char *skipped_sha1_access(size_t index, void *table)
477482
478483static int lookup_skipped (unsigned char * sha1 )
479484{
480- return sha1_pos (sha1 , skipped_sha1 , skipped_sha1_nr ,
485+ return sha1_pos (sha1 , skipped_revs . sha1 , skipped_revs . sha1_nr ,
481486 skipped_sha1_access );
482487}
483488
@@ -489,7 +494,7 @@ struct commit_list *filter_skipped(struct commit_list *list,
489494
490495 * tried = NULL ;
491496
492- if (!skipped_sha1_nr )
497+ if (!skipped_revs . sha1_nr )
493498 return list ;
494499
495500 prepare_skipped ();
@@ -551,7 +556,7 @@ static void bisect_common(struct rev_info *revs, const char *prefix,
551556 mark_edges_uninteresting (revs -> commits , revs , NULL );
552557
553558 revs -> commits = find_bisection (revs -> commits , reaches , all ,
554- !!skipped_sha1_nr );
559+ !!skipped_revs . sha1_nr );
555560}
556561
557562static void exit_if_skipped_commits (struct commit_list * tried ,
0 commit comments