{"thread":{"id":"56100","subject":"Confusing interaction between 'rebase -i' and 'commit.verbose' when squashing commits","startedAt":"2021-07-13T19:34:06Z","lastAt":"2021-07-13T19:42:55Z","messageCount":2,"participants":["Philippe Blain"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"429929","messageId":"9515534e-705a-ad1c-a1ac-704b2d565f37@gmail.com","threadId":"56100","inReplyTo":null,"subject":"Confusing interaction between 'rebase -i' and 'commit.verbose' when squashing commits","fromName":"Philippe Blain","fromEmail":"levraiphilippeblain@gmail.com","sentAt":"2021-07-13T19:34:01Z","receivedAt":"2021-07-13T19:34:06Z","isPatch":false,"sender":{"key":"levraiphilippeblain@gmail.com","avatar":"https://avatars.githubusercontent.com/u/44212482?v=4"},"body":"Hi,\n\nI encountered a situation when I did an interactive rebase and\nchanged two 'picks' to 'squash', without re-ordering anything.\nI have 'commit.verbose' set in my config.\n\nWhen I then saved the todo list to start the rebase, it opened my\neditor to edit the message for the squashed commit. The message shown\nin the editor is as expected (the messages from the three commits are shown),\nbut the diff below the scissors line, due to commit.verbose,\ncorresponds to the squashed changes only from the\n*first two commits* (the 'pick' and the first 'squash'); the changes\nfrom the second 'squash' are missing.\n\nRunning 'git diff --cached'\nin a second shell shows that those changes (the ones from the second 'squash')\nare correctly staged. HEAD points to a commit that has the changes from\nthe 'pick' and the first 'squash', and as commit message the message I'm\nseeing in my editor.\n\nThis is rather confusing.\n\nI do not have a quick reproducer unfortunately and I'm in a bit of a rush,\nbut I thought I'd just send this in case anyone notices quickly why this\nhappens just by reading the code (I would think somewhere in 'sequencer.c').\n\nCheers,\n\nPhilippe.\n"},{"id":"429930","messageId":"33021bd4-a126-c740-4a41-f357be8fe6c6@gmail.com","threadId":"56100","inReplyTo":"9515534e-705a-ad1c-a1ac-704b2d565f37@gmail.com","subject":"Re: Confusing interaction between 'rebase -i' and 'commit.verbose' when squashing commits","fromName":"Philippe Blain","fromEmail":"levraiphilippeblain@gmail.com","sentAt":"2021-07-13T19:42:41Z","receivedAt":"2021-07-13T19:42:55Z","isPatch":false,"sender":{"key":"levraiphilippeblain@gmail.com","avatar":"https://avatars.githubusercontent.com/u/44212482?v=4"},"body":"Le 2021-07-13 à 15:34, Philippe Blain a écrit :\n> \n> Running 'git diff --cached'\n> in a second shell shows that those changes (the ones from the second 'squash')\n> are correctly staged. HEAD points to a commit that has the changes from\n> the 'pick' and the first 'squash', and as commit message the message I'm\n> seeing in my editor.\n\nCorrection: the message in my editor has the messages from all three commits,\nbut the message of the commit pointed by HEAD only has the messages from the\nfirst two commits, i.e. the 'pick' and the first 'squash'\n\nThis is on with Git 2.32.0.1.g2ac0338718.\n\n"}]}