Re: [PATCH 5/7] enforce `xfuncname` precedence over `funcname`
- From
Matthieu Moy <matthieu.moy@grenoble-inp.fr>
- Date
- Jul 24, 2014, 18:47 UTC
- Message-ID
- <vpqegxa386m.fsf@anie.imag.fr>
- In-Reply-To
- <53D15188.2010209@gmail.com>
Tanay Abhra <tanayabh@gmail.com> writes:
> For core the only test failing was xfuncname vs funcname,
Being a little pessimistic: there may be other cases where the hashtable magically gives the right order for existing tests, but that would fail for untested use-cases.
But I can't think of any such case.
Show 6 quoted lines
> so the situation is not as bad as you think. One course of action > would be leave git_config() as it is, so that third party apps > may not be broken. Provide a function like git_config_cache(), > then rename all the git_config() calls in core to git_config_cache(), > fallback to git_config() where it is not applicable (for example, > git config -l).
I think Junio's point about "git config -l" is correct: we should just keep git_config_raw there.
OTOH, renaming git_config to git_config_cache seems a lot of code churn, so I'd keep the name git_config. Perhaps git_config_raw is no longer a good name and it could be called git_config_ordered.
If we keep one call to git_config_raw there, then maybe we can use it for xfuncname/funcname too, and keep the behavior unchanged.
> Also can you name any third party apps that use the git_config() > system on which I can test the patches.
There are probably tons of. I can think of git-multimail.
-- Matthieu Moy http://www-verimag.imag.fr/~moy/