{"thread":{"id":"51373","subject":"Git 2.22 , --preserve-merges fails with custom commentChar","startedAt":"2019-06-24T16:02:04Z","lastAt":"2019-06-24T16:02:04Z","messageCount":1,"participants":["Dmitriy Smirnov"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"377897","messageId":"68F548D4-DF5A-411E-AAB7-33C9DBF9B658@jetbrains.com","threadId":"51373","inReplyTo":null,"subject":"Git 2.22 , --preserve-merges fails with custom commentChar","fromName":"Dmitriy Smirnov","fromEmail":"dmitriy.smirnov@jetbrains.com","sentAt":"2019-06-24T16:01:55Z","receivedAt":"2019-06-24T16:02:04Z","isPatch":false,"sender":{"key":"dmitriy.smirnov@jetbrains.com","avatar":null},"body":"Hello,\n\nI know —preserve-merges is deprecated now and —rebase-merges should be used instead, however it is still possible to pass —preserve-merges flag, so the issue seems worth reporting.\n\nIn git 2.22, —preserve-merges does not work when custom commentchar is used. It shows the editor to select options bu then fails:\n\n➜  ProjectRoot git:(master) git -c core.quotepath=false -c log.showSignature=false -c core.commentChar=@ rebase --interactive --preserve-merges --no-autosquash 554597b2e2c73e636b9c0cdf24dacba38568d02b\nwarning: git rebase --preserve-merges is deprecated. Use --rebase-merges instead.\nerror: invalid line 6: @ Rebase 554597b..a8702dd onto 554597b (4 commands)\nerror: invalid line 6: @ Rebase 554597b..0607564 onto 554597b (4 commands)\nerror: invalid line 7: @\nerror: invalid line 8: @ Commands:\nerror: invalid line 9: @ p, pick <commit> = use commit\nerror: invalid line 10: @ r, reword <commit> = use commit, but edit the commit message\nerror: invalid line 11: @ e, edit <commit> = use commit, but stop for amending\nerror: invalid line 12: @ s, squash <commit> = use commit, but meld into previous commit\nerror: invalid line 13: @ f, fixup <commit> = like \"squash\", but discard this commit's log message\nerror: invalid line 14: @ x, exec <commit> = run command (the rest of the line) using shell\nerror: invalid line 15: @ d, drop <commit> = remove commit\nerror: invalid line 16: @ l, label <label> = label current HEAD with a name\nerror: invalid line 17: @ t, reset <label> = reset HEAD to a label\nerror: invalid line 18: @ m, merge [-C <commit> | -c <commit>] <label> [# <oneline>]\nerror: invalid line 19: @ .       create a merge commit using the original merge commit's\nerror: invalid line 20: @ .       message (or the oneline, if no original merge commit was\nerror: invalid line 21: @ .       specified). Use -c <commit> to reword the commit message.\nerror: invalid line 22: @\nerror: invalid line 23: @ These lines can be re-ordered; they are executed from top to bottom.\nerror: invalid line 24: @\nerror: invalid line 25: @ If you remove a line here THAT COMMIT WILL BE LOST.\nerror: invalid line 26: @\nerror: invalid line 27: @ However, if you remove everything, the rebase will be aborted.\nerror: invalid line 28: @\nerror: invalid line 29: @ Note that empty commits are commented out\nerror: unusable todo list: '.git/rebase-merge/git-rebase-todo'\nerror: invalid line 6: @ Rebase 554597b..0607564 onto 554597b (4 commands)\nerror: invalid line 7: @\nerror: invalid line 8: @ Commands:\nerror: invalid line 9: @ p, pick <commit> = use commit\nerror: invalid line 10: @ r, reword <commit> = use commit, but edit the commit message\nerror: invalid line 11: @ e, edit <commit> = use commit, but stop for amending\nerror: invalid line 12: @ s, squash <commit> = use commit, but meld into previous commit\nerror: invalid line 13: @ f, fixup <commit> = like \"squash\", but discard this commit's log message\nerror: invalid line 14: @ x, exec <commit> = run command (the rest of the line) using shell\nerror: invalid line 15: @ d, drop <commit> = remove commit\nerror: invalid line 16: @ l, label <label> = label current HEAD with a name\nerror: invalid line 17: @ t, reset <label> = reset HEAD to a label\nerror: invalid line 18: @ m, merge [-C <commit> | -c <commit>] <label> [# <oneline>]\nerror: invalid line 19: @ .       create a merge commit using the original merge commit's\nerror: invalid line 20: @ .       message (or the oneline, if no original merge commit was\nerror: invalid line 21: @ .       specified). Use -c <commit> to reword the commit message.\nerror: invalid line 22: @\nerror: invalid line 23: @ These lines can be re-ordered; they are executed from top to bottom.\nerror: invalid line 24: @\nerror: invalid line 25: @ If you remove a line here THAT COMMIT WILL BE LOST.\nerror: invalid line 26: @\nerror: invalid line 27: @ However, if you remove everything, the rebase will be aborted.\nerror: invalid line 28: @\nerror: invalid line 29: @ Note that empty commits are commented out"}]}