From: Philippe Blain <levraiphilippeblain@gmail.com>
To: Git mailing list <git@vger.kernel.org>
Subject: Confusing interaction between 'rebase -i' and 'commit.verbose' when squashing commits
Date: Tue, 13 Jul 2021 15:34:01 -0400 [thread overview]
Message-ID: <9515534e-705a-ad1c-a1ac-704b2d565f37@gmail.com> (raw)
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.
next reply other threads:[~2021-07-13 19:34 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-13 19:34 Philippe Blain [this message]
2021-07-13 19:42 ` Confusing interaction between 'rebase -i' and 'commit.verbose' when squashing commits Philippe Blain
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9515534e-705a-ad1c-a1ac-704b2d565f37@gmail.com \
--to=levraiphilippeblain@gmail.com \
--cc=git@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).