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

From:
Stefan Sperling <stsp@stsp.name>
Subject:
Re: got branch: support multiple -d options
To:
Christian Weisgerber <naddy@mips.inka.de>
Cc:
gameoftrees@openbsd.org
Date:
Mon, 16 May 2022 08:56:39 +0200

Download raw body.

Thread
On Sun, May 15, 2022 at 11:22:28PM +0200, Christian Weisgerber wrote:
> Stefan Sperling:
> 
> > If multiple -d options are passed to 'got branch' all arguments
> > except the last one end up being ignored.
> > 
> > It seems more useful to delete all specified branches instead.
> 
> Hmmm.  Should this behave like "ref -d", where the -d flag doesn't take
> an argument but switches to delete mode?

Or would it make sense to adjust 'got ref -d' to behave like
'got send -d' and 'got branch -d' (after this patch)?

Perhaps 'got ref' could remain as it is. Since it is not intended to
be used on a daily basis it doesn't need to provide much comfort.
Unlike the other tools it requires absolute refnames as input (which
start with "refs/"), and it does not have any safety checks. For instance,
'got branch -d' will refuse to delete a branch that is used by the current
work tree. 'got ref -d' will delete the branch no matter what.