Hi Junio,

On Fri, 3 Aug 2018, Junio C Hamano wrote:

> "Johannes Schindelin via GitGitGadget" <gitgitgad...@gmail.com>
> writes:
> 
> > From: Johannes Schindelin <johannes.schinde...@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

Reply via email to