{"thread":{"id":"47794","subject":"bad behaviour while using git rebase -i -p","startedAt":"2018-02-09T00:48:04Z","lastAt":"2018-02-09T02:32:37Z","messageCount":2,"participants":["Jan Viktorin","Junio C Hamano"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"338795","messageId":"20180209013902.6702a0dd@jvn","threadId":"47794","inReplyTo":null,"subject":"bad behaviour while using git rebase -i -p","fromName":"Jan Viktorin","fromEmail":"viktorin@rehivetech.com","sentAt":"2018-02-09T00:39:02Z","receivedAt":"2018-02-09T00:48:04Z","isPatch":false,"sender":{"key":"viktorin@rehivetech.com","avatar":null},"body":"Hello,\n\nsince Git 2.16.1, I've noticed a bad behaviour of git rebase -i -p. It\nscrews up merge commits created with --log (or config merge.log = true)\nin my history. A good merge commit with message like:\n\n    Merge branch 'test'\n    \n    * test:\n      c\n      b\n\nis changed after rebase (without touching that commit in any way) into:\n\n    Merge branch 'test' a git-rebase-p-test.sh test: c b\n\nIt seems, like the commit message is interpreted somehow - the '*'\ncharacter is expanded to the list of files in the current directory and\nthe original spacing is removed. This happens during my regular work.\n\nHere is a code that seems to be reproducing this behaviour well:\n\ngit init\n\ntouch a\ngit add a\ngit commit -m a\n\ngit checkout -b test\n# a new branch made to merge back to master later\n\ntouch b\ngit add b\ngit commit -m b\n\ntouch c\ngit add c\ngit commit -m c\n\ngit checkout master\ngit merge --no-edit --log test\ngit log -1\n# everything looks good at this point\n\nexport GIT_SEQUENCE_EDITOR='sed \"1s/pick/reword/\" -i'\n# we are rewording only the first commit...\nexport EDITOR='sed \"s/b/x/\" -i'\n# ...and changing its message from \"b\" to \"x\"\n\ngit rebase -i HEAD^1 -p\ngit log -1\n# here, you can see the bad merge commit message\n\nRegards\nJan\n"},{"id":"338796","messageId":"xmqqtvuq6gg3.fsf@gitster-ct.c.googlers.com","threadId":"47794","inReplyTo":"20180209013902.6702a0dd@jvn","subject":"Re: bad behaviour while using git rebase -i -p","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2018-02-09T02:32:28Z","receivedAt":"2018-02-09T02:32:37Z","isPatch":false,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Jan Viktorin <viktorin@rehivetech.com> writes:\n\n> since Git 2.16.1, I've noticed a bad behaviour of git rebase -i -p. It\n> screws up merge commits created with --log (or config merge.log = true)\n> in my history.  A good merge commit with message like:\n>\n>     Merge branch 'test'\n>     \n>     * test:\n>       c\n>       b\n>\n> is changed after rebase (without touching that commit in any way) into:\n>\n>     Merge branch 'test' a git-rebase-p-test.sh test: c b\n\nI think we saw this problem independently discovered and a fix for\nit posted today to the list.\n\n    https://public-inbox.org/git/20180208204241.19324-1-gregory.herrero@oracle.com/\n\nThanks.\n\n"}]}