Jay Soffian [off-list ref] writes:
quoted
I am not sure about the '\n' you unconditionally added at the end of the
existing message.
Right, the old code does that when the merge fails, counting on (I
think) git-commit to then take care of any extra newlines.
Ahh, that explains it. I was originally about to suggest running the
stripspace() only when we run the editor, and saw a failure from an
unrelated test and realized that running stripspace() on the result of
prepare-commit-msg is the right thing to do after all, because that is
what is done by "git commit". Yes, the current code does rely on the
stripspace to remove it, so there is no need to make it conditional.
So if we drop the "conditionally add '\n'" part in builtin/merge.c from my
"how about this on top" patch and we should be ready to go, right?
Thanks.