From: Phillip Wood Date: Wed, 20 Jan 2021 11:04:48 GMT Subject: Re: [PATCH v2 9/9] doc/git-rebase: add documentation for fixup [-C|-c] options Message-ID: <7c11da69-d2f1-0aab-80bc-d8ae8735f8ca@gmail.com> In-Reply-To: Hi Charvi On 19/01/2021 17:13, Charvi Mendiratta wrote: > Hi Marc, > > On Tue, 19 Jan 2021 at 20:07, Marc Branchaud wrote: > [...] >>> "pick" for the second and subsequent commits with "squash" or "fixup". >>> If the commits had different authors, the folded commit will be >>> attributed to the author of the first commit. The suggested commit >>> -message for the folded commit is the concatenation of the commit >>> -messages of the first commit and of those with the "squash" command, >>> -but omits the commit messages of commits with the "fixup" command. >>> +message for the folded commit is created as follows: >>> + >>> + - It is made using the commit message of a commit with the "fixup -C" >>> + or "fixup -c" command. In the later case an editor is opened to edit >>> + the commit message. >> >> s/later/latter/ >> > > Thanks, will fix it. > >> What happens if there is more than one "fixup -C/-c" command? >> > > Upon running interactive rebase, in todo list if we use for example sequence of > commands like `fixup -C`, `fixup -C` , `fixup -C` then it will fixup > content of all and > for commit message it will replace with the commit message of end `fixup -C` > > Similarly, if we have sequence like `fixup -c`, `fixup -c`, `fixup -c` > then also it will fixup > up all the content and here it allow user to edit the message, so > opens the editor once It is good that we only open the editor once in this case - I'd not thought about chains of `fixup -c` before reading this. Do we have a test to verify that the editor is only opened once? Best Wishes Phillip > in this case and shows the commit msg of end `fixup -c` to edit and > also contains > commented commit messages of complete fixup chain. So, for any sequence of fixup > chains `fixup -c` works as similar to the `squash` command. > > Hope it explains the working. > > Thanks and Regards, > Charvi >