Confusing interaction between 'rebase -i' and 'commit.verbose' when squashing commits

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

 



Hi,

I encountered a situation when I did an interactive rebase and
changed two 'picks' to 'squash', without re-ordering anything.
I have 'commit.verbose' set in my config.

When I then saved the todo list to start the rebase, it opened my
editor to edit the message for the squashed commit. The message shown
in the editor is as expected (the messages from the three commits are shown),
but the diff below the scissors line, due to commit.verbose,
corresponds to the squashed changes only from the
*first two commits* (the 'pick' and the first 'squash'); the changes
from the second 'squash' are missing.

Running 'git diff --cached'
in a second shell shows that those changes (the ones from the second 'squash')
are correctly staged. HEAD points to a commit that has the changes from
the 'pick' and the first 'squash', and as commit message the message I'm
seeing in my editor.

This is rather confusing.

I do not have a quick reproducer unfortunately and I'm in a bit of a rush,
but I thought I'd just send this in case anyone notices quickly why this
happens just by reading the code (I would think somewhere in 'sequencer.c').

Cheers,

Philippe.



[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