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

From:
Tracey Emery <tracey@traceyemery.net>
Subject:
Re: got add recursion ignore ignores
To:
gameoftrees@openbsd.org
Date:
Thu, 5 Dec 2019 10:59:14 -0700

Download raw body.

Thread
On Thu, Dec 05, 2019 at 06:57:12PM +0100, Stefan Sperling wrote:
> On Thu, Dec 05, 2019 at 10:22:43AM -0700, Tracey Emery wrote:
> > Hello,
> > 
> > The diff below adds -I to disregard ignores. Adding flags to the
> > got_worktree struct seemed like the simplest approach. If there is a
> > better alternative, let me know what you think.
> 
> Would it work to add a new 'int' argument to worktree_status() instead?
> It seems no_ignores could be passed from got_worktree_schedule_add()
> to worktree_status(). All other callers of worktree_status() would pass 0.
> 
> Adding this information to a new flags field in struct got_worktree
> essentially creates a global variable. I'd prefer to pass arguments so
> that it becomes easier to see where the values get used further down
> the call chain. And should use of the variable change later, auditing for
> unused function arguments is easier than auditing for unnecessary checks
> of a global flag.

I started with the approach. I'll go back and tackle the arg direction
instead.

Thanks.

-- 

Tracey Emery