Re: [PATCH v2 9/9] doc/git-rebase: add documentation for fixup [-C|-c] options

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 2021-01-19 12:13 p.m., Charvi Mendiratta wrote:
Hi Marc,

On Tue, 19 Jan 2021 at 20:07, Marc Branchaud <marcnarc@xxxxxxxxxxx> 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
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.

Yes, that does explain things.

I'm also under the impression that the "fixup -C/-c" commit's patch is still incorporated into the folded commit. Is that right?

So I think the documentation could be improved. Assuming that a "fixup -C/-c" commit's patch is incorporated just like with plain "fixup", something like:

The suggested commit message for the folded commit is the concatenation of the first commit's message with those identified by "squash" commands, omitting the messages of commits identified by "fixup" commands, `unless` "fixup -c" is used. In that case the suggested commit message is `only` the message of the "fixup -c" commit, and an editor is opened allowing you to edit the message. The contents (patch) of the "fixup -c" commit are still incorporated into the folded commit. If there is more than one "fixup -c" commit, the message from the last last one is used. You can also use "fixup -C" to get the same behavior as "fixup -c" except without opening an editor.

Thanks!

		M.





[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux