Re: [PATCH v4 4/4] rebase --skip: clean up commit message after a failed fixup/squash
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Apr 28, 2018, 13:05 UTC
- Message-ID
- <nycvar.QRO.7.76.6.1804281500080.79@tvgsbejvaqbjf.bet>
- In-Reply-To
- <CAGZ79kYJ--qt5AdM3EX9vwMb_AwD6gtWFp7wt2KP4OKsdOYLGQ@mail.gmail.com>
Hi Stefan,
On Fri, 27 Apr 2018, Stefan Beller wrote:
Show 13 quoted lines
> On Fri, Apr 27, 2018 at 1:48 PM, Johannes Schindelin > <johannes.schindelin@gmx.de> wrote: > > During a series of fixup/squash commands, the interactive rebase builds > > up a commit message with comments. This will be presented to the user in > > the editor if at least one of those commands was a `squash`. > > This sounds as if the whole series will be presented to the user, i.e. > > pick A > squash B > fixup C > > would present A+B+C in the editor.
And that is indeed the case. The commit message would look something like this:
# This is a combination of 3 commits. # This is commit message #1:
Hello Stefan
This is A.
# This is commit message #2:
squash! A
Me again, Stefan. I am here to be squashed.
# The commit message #3 will be skipped: # # fixup! A
> I always assumed the sequencer to be linear, i.e. pick A+B, open editor > and then fixup C into the previous result?
Nope.
> No need to resend it reworded, I just realize that I never tested my > potentially wrong assumption.
No worries, you learned something today.
> > The diff is best viewed with --color-moved. > > ... and web pages are "best viewed with IE 6.0" ;-)
That is what I had in mind writing that.
> I found this so funny that I had to download the patches and actually > look at them using the move detection only to find out that only very > few lines are moved, as there are only very few deleted lines.
I agree that the current iteration is no longer such obvious a move. I had to add tons of stuff to fix the extra issues I found while working on v4.
But still, I found it super-helpful to see that the code was actually moved, and where, because I essentially had to break up the nice sequence of "is it clean? Yes? Then nothing to be done! No? Is HEAD to be amended? Yes? No?" and basically build a matrix what to do in all combinations of "clean? Amend HEAD?"
Ciao, Dscho