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

Re: [PATCH v3 2/2] config: include file if remote URL matches a glob

flat view

From: Jonathan Tan <hidden>
Date: 2021-11-29 22:30:22

On Mon, Nov 15 2021, Jonathan Tan wrote:
quoted
+`hasremoteurl`::
+	The data that follows the keyword `hasremoteurl:` is taken to
Both here..
quoted
+		die(_("remote URLs cannot be configured in file directly or indirectly included by includeIf.hasremoteurl"));
..and here...
quoted
+		if (skip_prefix_mem(cond, cond_len, "hasremoteurl:", &url,
...but not here (C code)..
quoted
+	 * For internal use. Include all includeif.hasremoteurl paths without
..but here..
quoted
+test_expect_success 'includeIf.hasremoteurl' '
..and also here etc., let's consistently camelCase config keys whenever
we're not using them for lookups in the C
code.

I.e. "includeIf.hasRemoteUrl" (possibly "includeIf.hasRemoteURL"?). It
makes them a lot easier to read, and makes the end-user documentation &
messaging more consistent.
The middle part is not case-insensitive, though - I tried changing it in
the test and the test now fails. (Unless you mean that we should also
change the code to make it case-insensitive - but I would think that
it's better for the URL to be case-sensitive, and by extension, the
"hasremoteurl:" part connected to 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