Thread (73 messages) 73 messages, 8 authors, 2022-01-25

Re: [RFC PATCH 0/2] Conditional config includes based on remote URL

flat view

From: Jeff King <hidden>
Date: 2021-10-27 20:32:58

On Wed, Oct 27, 2021 at 10:52:59AM -0700, Jonathan Tan wrote:
quoted
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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help