Re: [PATCH v2] rebase -i: do leave commit message intact in fixup! chains
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Jan 28, 2021, 16:24 UTC
- Message-ID
- <nycvar.QRO.7.76.6.2101281724130.54@tvgsbejvaqbjf.bet>
- In-Reply-To
- <xmqqwnwhzr54.fsf@gitster.c.googlers.com>
Hi Junio,
On Tue, 12 Jan 2021, Junio C Hamano wrote:
Show 33 quoted lines
> "Johannes Schindelin via GitGitGadget" <gitgitgadget@gmail.com>
> writes:
>
> > We actually need to actively suppress that clean-up lest a configured
> > `commit.cleanup` may interfere with what we want to do: leave the commit
> > message unchanged.
>
> Good thinking.
>
> > Reported-by: Vojtěch Knyttl <vojtech@knyt.tl>
> > Helped-by: Martin Ågren <martin.agren@gmail.com>
> > Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
> > ---
> > ...
> > diff --git a/sequencer.c b/sequencer.c
> > index 8909a467700..092e7b811f0 100644
> > --- a/sequencer.c
> > +++ b/sequencer.c
> > @@ -943,6 +943,7 @@ N_("you have staged changes in your working tree\n"
> > #define CLEANUP_MSG (1<<3)
> > #define VERIFY_MSG (1<<4)
> > #define CREATE_ROOT_COMMIT (1<<5)
> > +#define VERBATIM_MSG (1<<6)
>
> It somewhat bothers me that these pretend to be orthogonal options
> that can be mixed and matched, but CLEANUP and VERBATIM do not make
> sense to be used at the same time. As long as we have some safety
> to ensure that both bits are not used at the same time, i.e.e.g.
>
> if ((flags & (CLEANUP_MSG|VERBATIM_MSG)) == (CLEANUP_MSG|VERBATIM_MSG))
> BUG("cleanup and verbatim asked at the same time");
>
> it would be OK, though.I did something similar in spirit in the latest iteration.
Thanks, Dscho