Re: [PATCH 2/2] rebase --exec: make it work with --rebase-merges
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Aug 6, 2018, 09:34 UTC
- Message-ID
- <nycvar.QRO.7.76.6.1808061132420.71@tvgsbejvaqbjf.bet>
- In-Reply-To
- <xmqq1sbfxq1x.fsf@gitster-ct.c.googlers.com>
Hi Junio,
On Fri, 3 Aug 2018, Junio C Hamano wrote:
Show 22 quoted lines
> "Johannes Schindelin via GitGitGadget" <gitgitgadget@gmail.com> > writes: > > > From: Johannes Schindelin <johannes.schindelin@gmx.de> > > > > The idea of `--exec` is to append an `exec` call after each `pick`. > > > > Since the introduction of fixup!/squash! commits, this idea was extended > > to apply to "pick, possibly followed by a fixup/squash chain", i.e. an > > exec would not be inserted between a `pick` and any of its corresponding > > `fixup` or `squash` lines. > > > > The current implementation uses a dirty trick to achieve that: it > > assumes that there are only pick/fixup/squash commands, and then > > *inserts* the `exec` lines before any `pick` but the first, and appends > > a final one. > > Ahh, it may be "dirty" but "clever" ;-) As there is no way to say > "add exec after only the third one", inserting before 'pick', > assuming the lines before that would be a "previous group" that > began with a pick and then possibly its amending operations, was > sufficient. Makes sense.
Yes, it was clever. It is the kind of clever that causes regressions when new features are introduced that were not anticipated by the cleverness.
Ciao, Dscho