revert: use strbuf to refactor the code that writes the merge message