From: Johannes Schindelin Date: Mon, 06 Aug 2018 09:34:25 GMT Subject: Re: [PATCH 2/2] rebase --exec: make it work with --rebase-merges Message-ID: In-Reply-To: Hi Junio, On Fri, 3 Aug 2018, Junio C Hamano wrote: > "Johannes Schindelin via GitGitGadget" > writes: > > > From: Johannes Schindelin > > > > 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