@@ -403,11 +403,11 @@ static void am_load(struct am_state *state)
403403 struct strbuf sb = STRBUF_INIT ;
404404
405405 if (read_state_file (& sb , state , "next" , 1 ) < 0 )
406- die ( "BUG: state file 'next' does not exist" );
406+ BUG ( " state file 'next' does not exist" );
407407 state -> cur = strtol (sb .buf , NULL , 10 );
408408
409409 if (read_state_file (& sb , state , "last" , 1 ) < 0 )
410- die ( "BUG: state file 'last' does not exist" );
410+ BUG ( " state file 'last' does not exist" );
411411 state -> last = strtol (sb .buf , NULL , 10 );
412412
413413 if (read_author_script (state ) < 0 )
@@ -986,7 +986,7 @@ static int split_mail(struct am_state *state, enum patch_format patch_format,
986986 case PATCH_FORMAT_MBOXRD :
987987 return split_mail_mbox (state , paths , keep_cr , 1 );
988988 default :
989- die ( "BUG: invalid patch_format" );
989+ BUG ( " invalid patch_format" );
990990 }
991991 return -1 ;
992992}
@@ -1041,7 +1041,7 @@ static void am_setup(struct am_state *state, enum patch_format patch_format,
10411041 str = "b" ;
10421042 break ;
10431043 default :
1044- die ( "BUG: invalid value for state->keep" );
1044+ BUG ( " invalid value for state->keep" );
10451045 }
10461046
10471047 write_state_text (state , "keep" , str );
@@ -1058,7 +1058,7 @@ static void am_setup(struct am_state *state, enum patch_format patch_format,
10581058 str = "t" ;
10591059 break ;
10601060 default :
1061- die ( "BUG: invalid value for state->scissors" );
1061+ BUG ( " invalid value for state->scissors" );
10621062 }
10631063 write_state_text (state , "scissors" , str );
10641064
@@ -1216,7 +1216,7 @@ static int parse_mail(struct am_state *state, const char *mail)
12161216 mi .keep_non_patch_brackets_in_subject = 1 ;
12171217 break ;
12181218 default :
1219- die ( "BUG: invalid value for state->keep" );
1219+ BUG ( " invalid value for state->keep" );
12201220 }
12211221
12221222 if (state -> message_id )
@@ -1232,7 +1232,7 @@ static int parse_mail(struct am_state *state, const char *mail)
12321232 mi .use_scissors = 1 ;
12331233 break ;
12341234 default :
1235- die ( "BUG: invalid value for state->scissors" );
1235+ BUG ( " invalid value for state->scissors" );
12361236 }
12371237
12381238 mi .input = xfopen (mail , "r" );
@@ -1463,7 +1463,7 @@ static int run_apply(const struct am_state *state, const char *index_file)
14631463 int options = 0 ;
14641464
14651465 if (init_apply_state (& apply_state , NULL ))
1466- die ( "BUG: init_apply_state() failed" );
1466+ BUG ( " init_apply_state() failed" );
14671467
14681468 argv_array_push (& apply_opts , "apply" );
14691469 argv_array_pushv (& apply_opts , state -> git_apply_opts .argv );
@@ -1489,7 +1489,7 @@ static int run_apply(const struct am_state *state, const char *index_file)
14891489 apply_state .apply_verbosity = verbosity_silent ;
14901490
14911491 if (check_apply_state (& apply_state , force_apply ))
1492- die ( "BUG: check_apply_state() failed" );
1492+ BUG ( " check_apply_state() failed" );
14931493
14941494 argv_array_push (& apply_paths , am_path (state , "patch" ));
14951495
@@ -2407,7 +2407,7 @@ int cmd_am(int argc, const char **argv, const char *prefix)
24072407 ret = show_patch (& state );
24082408 break ;
24092409 default :
2410- die ( "BUG: invalid resume value" );
2410+ BUG ( " invalid resume value" );
24112411 }
24122412
24132413 am_state_release (& state );
0 commit comments