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)
65946594 char * * subjects ;
65956595 struct commit_todo_item commit_todo ;
65966596 struct todo_item * items = NULL ;
6597+ int ret = 0 ;
65976598
65986599 init_commit_todo_item (& commit_todo );
65996600 /*
@@ -6624,8 +6625,8 @@ int todo_list_rearrange_squash(struct todo_list *todo_list)
66246625 }
66256626
66266627 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 ;
66296630 }
66306631
66316632 repo_parse_commit (the_repository , item -> commit );
@@ -6727,6 +6728,7 @@ int todo_list_rearrange_squash(struct todo_list *todo_list)
67276728 todo_list -> items = items ;
67286729 }
67296730
6731+ cleanup :
67306732 free (next );
67316733 free (tail );
67326734 for (i = 0 ; i < todo_list -> nr ; i ++ )
@@ -6736,7 +6738,7 @@ int todo_list_rearrange_squash(struct todo_list *todo_list)
67366738
67376739 clear_commit_todo_item (& commit_todo );
67386740
6739- return 0 ;
6741+ return ret ;
67406742}
67416743
67426744int sequencer_determine_whence (struct repository * r , enum commit_whence * whence )
You can’t perform that action at this time.
0 commit comments