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

From:
Stefan Sperling <stsp@stsp.name>
Subject:
Re: expand keyword support to more commands
To:
Mark Jamsek <mark@jamsek.com>
Cc:
gameoftrees@openbsd.org
Date:
Mon, 17 Jul 2023 16:47:53 +0200

Download raw body.

Thread
On Tue, Jul 18, 2023 at 12:38:14AM +1000, Mark Jamsek wrote:
> Mark Jamsek <mark@jamsek.com> wrote:
> > This adds commit keywords to backout, branch, checkout, cherrypick, and
> > patch. I've added some basic tests for the new commands, but also added
> > some less trivial test cases to log regress.
> > 
> > The special case here is 'got checkout' as it creates a work tree based
> > on either the repository's HEAD or the head of the branch specified with
> > -b; therefore, irrespective of whether -b is used, the :base and :head
> > keywords are equivalent as the work tree's base commit will always be
> > the head of the checked-out branch.
> > 
> > I don't think this is a problem, but worth pointing out. Please see how
> > I've noted this in the manual.
> > 
> > Of these new additions, this is especially useful for both the backout
> > and cherrypick commands, but I think they will also get good use with
> > the branch command too. I still want to add support to the blame, cat,
> > tag, and tree commands but I've run out of time tonight so will do it
> > tomorrow. It's trivial to make the change in got.c, but I want to have
> > tests for them. And I would also like to support keywords in tog too;
> > it will be nice to have that consistency across both UIs.
> > 
> 
> I had a case of using HEAD to refer to both the repository and
> work tree branch head; revised diff below:

Reads fine to me, ok.