@@ -403,11 +403,11 @@ static void am_load(struct am_state *state)
403
403
struct strbuf sb = STRBUF_INIT ;
404
404
405
405
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" );
407
407
state -> cur = strtol (sb .buf , NULL , 10 );
408
408
409
409
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" );
411
411
state -> last = strtol (sb .buf , NULL , 10 );
412
412
413
413
if (read_author_script (state ) < 0 )
@@ -986,7 +986,7 @@ static int split_mail(struct am_state *state, enum patch_format patch_format,
986
986
case PATCH_FORMAT_MBOXRD :
987
987
return split_mail_mbox (state , paths , keep_cr , 1 );
988
988
default :
989
- die ( "BUG: invalid patch_format" );
989
+ BUG ( " invalid patch_format" );
990
990
}
991
991
return -1 ;
992
992
}
@@ -1041,7 +1041,7 @@ static void am_setup(struct am_state *state, enum patch_format patch_format,
1041
1041
str = "b" ;
1042
1042
break ;
1043
1043
default :
1044
- die ( "BUG: invalid value for state->keep" );
1044
+ BUG ( " invalid value for state->keep" );
1045
1045
}
1046
1046
1047
1047
write_state_text (state , "keep" , str );
@@ -1058,7 +1058,7 @@ static void am_setup(struct am_state *state, enum patch_format patch_format,
1058
1058
str = "t" ;
1059
1059
break ;
1060
1060
default :
1061
- die ( "BUG: invalid value for state->scissors" );
1061
+ BUG ( " invalid value for state->scissors" );
1062
1062
}
1063
1063
write_state_text (state , "scissors" , str );
1064
1064
@@ -1216,7 +1216,7 @@ static int parse_mail(struct am_state *state, const char *mail)
1216
1216
mi .keep_non_patch_brackets_in_subject = 1 ;
1217
1217
break ;
1218
1218
default :
1219
- die ( "BUG: invalid value for state->keep" );
1219
+ BUG ( " invalid value for state->keep" );
1220
1220
}
1221
1221
1222
1222
if (state -> message_id )
@@ -1232,7 +1232,7 @@ static int parse_mail(struct am_state *state, const char *mail)
1232
1232
mi .use_scissors = 1 ;
1233
1233
break ;
1234
1234
default :
1235
- die ( "BUG: invalid value for state->scissors" );
1235
+ BUG ( " invalid value for state->scissors" );
1236
1236
}
1237
1237
1238
1238
mi .input = xfopen (mail , "r" );
@@ -1463,7 +1463,7 @@ static int run_apply(const struct am_state *state, const char *index_file)
1463
1463
int options = 0 ;
1464
1464
1465
1465
if (init_apply_state (& apply_state , NULL ))
1466
- die ( "BUG: init_apply_state() failed" );
1466
+ BUG ( " init_apply_state() failed" );
1467
1467
1468
1468
argv_array_push (& apply_opts , "apply" );
1469
1469
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)
1489
1489
apply_state .apply_verbosity = verbosity_silent ;
1490
1490
1491
1491
if (check_apply_state (& apply_state , force_apply ))
1492
- die ( "BUG: check_apply_state() failed" );
1492
+ BUG ( " check_apply_state() failed" );
1493
1493
1494
1494
argv_array_push (& apply_paths , am_path (state , "patch" ));
1495
1495
@@ -2407,7 +2407,7 @@ int cmd_am(int argc, const char **argv, const char *prefix)
2407
2407
ret = show_patch (& state );
2408
2408
break ;
2409
2409
default :
2410
- die ( "BUG: invalid resume value" );
2410
+ BUG ( " invalid resume value" );
2411
2411
}
2412
2412
2413
2413
am_state_release (& state );
0 commit comments