git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH v3] config: add support for http.<url>.* settings

From
Jeff King <peff@peff.net>
Date
Jul 15, 2013, 05:12 UTC
Message-ID
<20130715051233.GC21127@sigill.intra.peff.net>
In-Reply-To
<7v8v18fp2s.fsf@alter.siamese.dyndns.org>
On Sun, Jul 14, 2013 at 09:02:19PM -0700, Junio C Hamano wrote:
Show 13 quoted lines
> > Or proceed with what's there right now (there are a few pending
> > updates from reviewers) and then, as Junio says above, adjust it later
> > if needed?
> 
> I have been assuming that "strictly textual match" will be a subset
> of the matching semantics Aaron and Peff suggested.  That is, if we
> include your version in the upcoming release, the user writes the
> http.<URLpattern>.<variable> configuration so that the entries match
> what they want them to match, the enhanced URL matcher Aaron and
> Peff suggested will still make them match.
> 
> Am I mistaken?  Will there be some <URLpattern> that will not match
> with the same URL literally?

I think we need to decide now, because the two schemes are not compatible, and switching will break setups. Yes, the matcher that Aaron and I suggest is a strict superset (i.e., we will not stop matching things that used to match), which is good. But we would not be able to implement "longest prefix wins" overriding anymore, which would change the meaning of cases like:

  [http "https://example.com"] foo = 1
  [http] foo = 2

(under Kyle's scheme it is "1", and under ours "2"). We can probably come up with some clever rules for overriding a broken-down URL that would stay backwards compatible. E.g., longest-prefix-match if there are no wildcarded components, and last-one-wins if there are. But that is not a rule I would want readers to have to puzzle out in the documentation.

So I think we are much better off to decide the semantics now.
-Peff
Previous: Junio C HamanoNext: Kyle J. McKay
Message 9 of 11 in “config: add support for http.<url>.* settings”
  1. config: add support for http.<url>.* settingsKyle J. McKay, Jul 11, 2013
  2. Junio C HamanoJul 11, 2013
  3. Jeff KingJul 12, 2013
  4. Kyle J. McKayJul 12, 2013
  5. Aaron SchrabJul 12, 2013
  6. Jeff KingJul 15, 2013
  7. Kyle J. McKayJul 13, 2013
  8. Junio C HamanoJul 15, 2013
  9. Jeff KingJul 15, 2013
  10. Kyle J. McKayJul 15, 2013
  11. Jeff KingJul 15, 2013

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.