Re: [PATCH 1/1] config: allow user to know scope of config options
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Dec 21, 2019, 02:37 UTC
- Message-ID
- <xmqqtv5u76ag.fsf@gitster-ct.c.googlers.com>
- In-Reply-To
- <CAOjrSZsiW-vxHKBqbEuBS6rpQ7m22wRp0UwGVVAJE2WE3bh-XQ@mail.gmail.com>
Matt Rogers <mattr94@gmail.com> writes:
Show 10 quoted lines
> Philip, > >>The commit message doesn't fully highlight that the config list will >>often be all the users config values, so each value will be >>disambiguated/identified as to it's origin. > > I don't really understand what you mean by "it's origin" here. When > you say origin, do you mean in the "--show-origin" sense of "file/blob/etc." > or something else? Because scope is kind of an orthogonal concept to origin > in that sense as you can have files with different origins but the same scope.
I do not think origin and scope are orghogonal, though. Can the same file appear as the source for different configuration var-value pair in two different scopes?
It is likely that you can _guess_ with high precision that given a pathname reported by --show-origin what scope it is in. It on the other hand is not so trivial given a scope to guess which exact file a var-value pair came from, I would think.\