Re: [PATCH v2] rebase -i: do leave commit message intact in fixup! chains

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"Johannes Schindelin via GitGitGadget" <gitgitgadget@xxxxxxxxx>
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@xxxxxxx>
> Helped-by: Martin Ågren <martin.agren@xxxxxxxxx>
> Signed-off-by: Johannes Schindelin <johannes.schindelin@xxxxxx>
> ---
> ...
> 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.

Thanks.





[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux