On Tue, Jan 18 2022, Junio C Hamano wrote: > Ævar Arnfjörð Bjarmason <avarab@xxxxxxxxx> writes: > >> If we had a grep IPC call of some sort we'd surely limit it to the >> "modern" config of grep.patternType, and take the opportunity to >> deprecate grep.extendedRegexp from that interface. > > A process that visits more than one repositories, with different > configuration, does not have such a choice. As far as I tell, there > is not yet a way to undo the static in the code after these patches > so that such a process can reset between repositories. Yes, it does assume the current one-shot API users, e.g. "git grep --recurse-submodules" only reads the config of the one parent repo. > A member that is necessary only during configuration parsing is not > a problem as long as the field is marked clearly as such (I wouldn't > even call that "not a NEW problem", since it is not a problem to > begin with, and I am sure there are more examples in other > subsystems). A static inside a helper function that has subtle > interactions with second and subsequent invocations makes the code > much harder to follow, on the other hand. *nod*, will change it.