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

From:
Omar Polo <op@omarpolo.com>
Subject:
Re: got histedit -d (drop all commits)
To:
Stefan Sperling <stsp@stsp.name>
Cc:
Mark Jamsek <mark@jamsek.com>, Game of Trees <gameoftrees@openbsd.org>
Date:
Mon, 30 Jan 2023 16:09:57 +0100

Download raw body.

Thread
On 2023/01/30 15:19:09 +0100, Stefan Sperling <stsp@stsp.name> wrote:
> On Tue, Jan 31, 2023 at 12:16:26AM +1100, Mark Jamsek wrote:
> > As discussed on irc, the below diff introduces the histedit -d flag,
> > which is like -f but drops all commits. Regress has also been added for
> > the new flag.
> > 
> > While writing this, I noticed we missed a conflict check for -f and -e,
> > which is included in the diff, but I should probably send as a separate
> > commit.
> > 
> > diffstat /home/mark/src/got
> >  M  got/got.1                    |    9+   1-
> >  M  got/got.c                    |   41+  11-
> >  M  regress/cmdline/histedit.sh  |  117+   0-
> > 
> > 3 files changed, 167 insertions(+), 12 deletions(-)
> 
> Nice, ok by me.

+1 for me too

> One can already use 'got ref' or 'got branch' to achieve a similar effect.
> But it is a good idea to make this functionality easy to discover and use
> with the histedit command.

and it's also a bit safer than overriding refs :)