From: Jeff King Date: Wed, 27 Oct 2021 20:32:54 GMT Subject: Re: [RFC PATCH 0/2] Conditional config includes based on remote URL Message-ID: In-Reply-To: <20211027175259.2230232-1-jonathantanmy@google.com> On Wed, Oct 27, 2021 at 10:52:59AM -0700, Jonathan Tan wrote: > > If the deferred includes were processed at the end of each individual > > file, that would solve that. You're still left with the slight oddness > > that a deferred include may override options within the same file that > > come after it, but that's inherent to the "defer" concept, and the > > answer is probably "don't do that". It's only when it crosses file > > boundaries (which are explicitly ordered by priority) that it really > > hurts. > > This would indeed solve the issue of the user needing to know the trick > to override variables set by deferred includes. But this wouldn't solve > our primary use case in which a system-level config defines a > conditional include but the repo config defines the URL, I think. Doh, of course. I forgot that was the whole point of the defer. ;) > I am implementing something similar to your first approach (stashing > things). It's almost done so hopefully we'll have something concrete to > discuss soon. Sounds good. -Peff