Smattr / mattutils

Repository for all my random tools and scripts I use
11 stars 1 forks source link

Rerebase: Newlines are stripped from inline commit messages #26

Closed Smattr closed 8 years ago

Smattr commented 8 years ago

During an interactive rebase, Git sometimes opens your editor to amend a commit message (e.g. after resolving a merge conflict). Unfortunately, as rerebase has overridden your editor, it takes over and strips newlines after you've written your nice commit message. I would think it also tries to insert diffs into your commit message, but thankfully this fails. This can be easily worked around by just never resuming a rebase with rerebase in effect, but this is a bit hacky. The obvious solution here is to mimic Git more faithfully and only strip comments, not blank lines as well.