File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -6594,6 +6594,7 @@ int todo_list_rearrange_squash(struct todo_list *todo_list)
6594
6594
char * * subjects ;
6595
6595
struct commit_todo_item commit_todo ;
6596
6596
struct todo_item * items = NULL ;
6597
+ int ret = 0 ;
6597
6598
6598
6599
init_commit_todo_item (& commit_todo );
6599
6600
/*
@@ -6624,8 +6625,8 @@ int todo_list_rearrange_squash(struct todo_list *todo_list)
6624
6625
}
6625
6626
6626
6627
if (is_fixup (item -> command )) {
6627
- clear_commit_todo_item ( & commit_todo );
6628
- return error ( _ ( "the script was already rearranged." )) ;
6628
+ ret = error ( _ ( "the script was already rearranged." ) );
6629
+ goto cleanup ;
6629
6630
}
6630
6631
6631
6632
repo_parse_commit (the_repository , item -> commit );
@@ -6727,6 +6728,7 @@ int todo_list_rearrange_squash(struct todo_list *todo_list)
6727
6728
todo_list -> items = items ;
6728
6729
}
6729
6730
6731
+ cleanup :
6730
6732
free (next );
6731
6733
free (tail );
6732
6734
for (i = 0 ; i < todo_list -> nr ; i ++ )
@@ -6736,7 +6738,7 @@ int todo_list_rearrange_squash(struct todo_list *todo_list)
6736
6738
6737
6739
clear_commit_todo_item (& commit_todo );
6738
6740
6739
- return 0 ;
6741
+ return ret ;
6740
6742
}
6741
6743
6742
6744
int sequencer_determine_whence (struct repository * r , enum commit_whence * whence )
You can’t perform that action at this time.
0 commit comments