@@ -2573,8 +2573,9 @@ static int check_label_or_ref_arg(enum todo_command command, const char *arg)
25732573 return 0 ;
25742574}
25752575
2576- static int parse_insn_line (struct repository * r , struct todo_item * item ,
2577- const char * buf , const char * bol , char * eol )
2576+ static int parse_insn_line (struct repository * r , struct replay_opts * opts UNUSED ,
2577+ struct todo_item * item , const char * buf ,
2578+ const char * bol , char * eol )
25782579{
25792580 struct object_id commit_oid ;
25802581 char * end_of_object_name ;
@@ -2708,8 +2709,8 @@ int sequencer_get_last_command(struct repository *r UNUSED, enum replay_action *
27082709 return ret ;
27092710}
27102711
2711- int todo_list_parse_insn_buffer (struct repository * r , char * buf ,
2712- struct todo_list * todo_list )
2712+ int todo_list_parse_insn_buffer (struct repository * r , struct replay_opts * opts ,
2713+ char * buf , struct todo_list * todo_list )
27132714{
27142715 struct todo_item * item ;
27152716 char * p = buf , * next_p ;
@@ -2727,7 +2728,7 @@ int todo_list_parse_insn_buffer(struct repository *r, char *buf,
27272728
27282729 item = append_new_todo (todo_list );
27292730 item -> offset_in_buf = p - todo_list -> buf .buf ;
2730- if (parse_insn_line (r , item , buf , p , eol )) {
2731+ if (parse_insn_line (r , opts , item , buf , p , eol )) {
27312732 res = error (_ ("invalid line %d: %.*s" ),
27322733 i , (int )(eol - p ), p );
27332734 item -> command = TODO_COMMENT + 1 ;
@@ -2875,7 +2876,7 @@ static int read_populate_todo(struct repository *r,
28752876 if (strbuf_read_file_or_whine (& todo_list -> buf , todo_file ) < 0 )
28762877 return -1 ;
28772878
2878- res = todo_list_parse_insn_buffer (r , todo_list -> buf .buf , todo_list );
2879+ res = todo_list_parse_insn_buffer (r , opts , todo_list -> buf .buf , todo_list );
28792880 if (res ) {
28802881 if (is_rebase_i (opts ))
28812882 return error (_ ("please fix this using "
@@ -2905,7 +2906,7 @@ static int read_populate_todo(struct repository *r,
29052906 struct todo_list done = TODO_LIST_INIT ;
29062907
29072908 if (strbuf_read_file (& done .buf , rebase_path_done (), 0 ) > 0 &&
2908- !todo_list_parse_insn_buffer (r , done .buf .buf , & done ))
2909+ !todo_list_parse_insn_buffer (r , opts , done .buf .buf , & done ))
29092910 todo_list -> done_nr = count_commands (& done );
29102911 else
29112912 todo_list -> done_nr = 0 ;
@@ -5251,7 +5252,8 @@ int sequencer_continue(struct repository *r, struct replay_opts *opts)
52515252 goto release_todo_list ;
52525253
52535254 if (file_exists (rebase_path_dropped ())) {
5254- if ((res = todo_list_check_against_backup (r , & todo_list )))
5255+ if ((res = todo_list_check_against_backup (r , opts ,
5256+ & todo_list )))
52555257 goto release_todo_list ;
52565258
52575259 unlink (rebase_path_dropped ());
@@ -6294,7 +6296,7 @@ int complete_action(struct repository *r, struct replay_opts *opts, unsigned fla
62946296 return error (_ ("nothing to do" ));
62956297 }
62966298
6297- res = edit_todo_list (r , todo_list , & new_todo , shortrevisions ,
6299+ res = edit_todo_list (r , opts , todo_list , & new_todo , shortrevisions ,
62986300 shortonto , flags );
62996301 if (res == -1 )
63006302 return -1 ;
@@ -6322,7 +6324,7 @@ int complete_action(struct repository *r, struct replay_opts *opts, unsigned fla
63226324 strbuf_release (& buf2 );
63236325 /* Nothing is done yet, and we're reparsing, so let's reset the count */
63246326 new_todo .total_nr = 0 ;
6325- if (todo_list_parse_insn_buffer (r , new_todo .buf .buf , & new_todo ) < 0 )
6327+ if (todo_list_parse_insn_buffer (r , opts , new_todo .buf .buf , & new_todo ) < 0 )
63266328 BUG ("invalid todo list after expanding IDs:\n%s" ,
63276329 new_todo .buf .buf );
63286330
0 commit comments