Re: [PATCH v6 1/3] ref-filter: add worktreepath atom
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Jan 24, 2019, 19:30 UTC
- Message-ID
- <xmqqd0olj1kj.fsf@gitster-ct.c.googlers.com>
- In-Reply-To
- <20190124183235.GA16580@sigill.intra.peff.net>
Jeff King <peff@peff.net> writes:
Show 6 quoted lines
> What if you have other atoms that need worktrees? E.g., does > %(worktreepath:foo) use the same used_atom slot? What if we have another > worktree-related atom? > ... > And that one is a good example where we _do_ need the global, because we > already have multiple atoms pulling from it.
I guess that we broke the original atom design by mistake when we added ":<modifiers>" support. There should have been one layer of indirection that binds the instances of the same atom with different modifiers together---I agree with you that we cannot avoid globals without fixing that mistake first.
Thanks.