Skip to content

Commit c8fe4f2

Browse files
committed
sequencer: handle merge_trees() errors correctly
The merge_trees() function returns 1 when the merge was clean, and 0 when merge conflicts were encountered. If even more serious errors occur, though, it returns negative values. This patch fixes sequencer's behavior in case of such serious errors. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
1 parent 957783d commit c8fe4f2

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

sequencer.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -410,6 +410,8 @@ static int do_recursive_merge(struct commit *base, struct commit *next,
410410
clean = merge_trees(&o,
411411
head_tree,
412412
next_tree, base_tree, &result);
413+
if (clean < 0)
414+
return clean;
413415

414416
if (active_cache_changed &&
415417
write_locked_index(&the_index, &index_lock, COMMIT_LOCK))

0 commit comments

Comments
 (0)