rebasing-merge: in case of an error, write out a finish script