Thread (1 message) 1 message, 1 author, 2022-01-18

Re: [PATCH v8 09/10] grep: simplify config parsing and option parsing

From: Junio C Hamano <hidden>
Date: 2022-01-18 22:55:27

Junio C Hamano [off-list ref] writes:
quoted
@@ -56,17 +62,22 @@ int grep_config(const char *var, const char *value, void *cb)
 {
 	struct grep_opt *opt = cb;
 	const char *slot;
+	static int ero = -1;
Is this new reentrancy issue worth it?  I think it makes the whole
thing unnecessarily complex, compared to a more naïve "we keep track
of the last-one-that-won for grep.extendedRegexp and
grep.patternType separately during option and config parsing inside
the grep_opt structure, and then combine the two when we compile the
pattern string into regexp or pcre object" approach.
Another problem is that there are those corporate server-side folks
who are interested in giving an endpoint that lets clients to ask
performing Git operations (like grep and blame).  Adding more statics
instead of keeping track of dynamic runtime structure like grep_opt
is deliberately making things more difficult for them, isn't it?

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help