"GOT", but the "O" is a cute, smiling pufferfish. Index | Thread | Search

From:
Stefan Sperling <stsp@stsp.name>
Subject:
Re: preventing non-sensical `mesg' in histedit
To:
Omar Polo <op@omarpolo.com>
Cc:
gameoftrees@openbsd.org
Date:
Tue, 12 Jul 2022 10:31:53 +0200

Download raw body.

Thread
On Mon, Jul 11, 2022 at 09:12:48PM +0200, Omar Polo wrote:
> while talking on irc this issue pop up: there can be some strange
> interactions between the commands in the histedit script.
> 
> while none of this is really surprising, preventing `mesg' in some
> situations where the outcome is non-sensical.  In particular, a fold or
> drop followed by a mesg.  (in the first case the commit would be first
> reworded and then deleted, in the second case it would be reworded and
> then the new text discarded by fold.)
> 
> so, the only valid options are pick -> mesg and edit -> mesg (which is
> used by the regress test at least.)  It would be nice to prevent mesg ->
> mesg too maybe.

Indeed, two consecutive mesg lines should also be a syntax error.

> diff below does this and adds a regress, ok?

Yes, ok.

I can update the man page once this goes in.