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

Re: [REQUEST 1/1] docs: update http.<url>.* options documentation

From
Jeff King <peff@peff.net>
Date
Jul 26, 2013, 04:37 UTC
Message-ID
<20130726043748.GA20286@sigill.intra.peff.net>
In-Reply-To
<ec5ecd4fe44af87e83778ce8e297afe@f74d39fa044aa309eaea14b9f57fe79>
On Thu, Jul 25, 2013 at 03:39:13PM -0700, Kyle J. McKay wrote:
Show 5 quoted lines
> Overhaul the text of the http.<url>.* options documentation
> providing a hopefully easier to understand itemized list of
> matching behavior as suggested by and including text from
> Jeff King.
> ---
Signed-off-by: Jeff King <peff@peff.net>
You should add your S-O-B, too, for your bits.
Show 5 quoted lines
> +--
> +. Scheme (e.g., `https` in `https://example.com/`). This field
> +  must match exactly between the config key and the URL.
> +. Host/domain name (e.g., `example.com` in `https://example.com/`).
> +  This field must match exactly between the config key and the URL.

These look fine in the rendered manpage, but I think the source might be a little easier to read with a blank line between items.

> +. Port number (e.g., `8080` in `http://example.com:8080/`).
> +  This field must match exactly between the config key and the URL.
> +  Omitted port numbers are automatically converted to the correct
> +  default for the scheme before matching.
Thanks, I forgot to include port number in my original suggested text.
Show 5 quoted lines
> +. Exact user name match (e.g., `user` in `https://user@example.com/repo.git`).
> +  If the config key has a user name it must match the user name in the URL
> +  exactly.
> +. Any user name match.  If a config key does not have a user name, that config
> +  key will match a URL with any user name (including none).
IMHO, this would be more clear as a single item, like:
  . User name (e.g., `user` in `https://user@example.com/repo.git`). If
    the config key has a user name it must match the user name in the
    URL exactly. If the config key does not have a user name, that
    config key will match a URL with any user name (including none).
> +All URLs are normalized before attempting any matching (the password part,
> +if embedded in the URL, is always ignored for matching purposes) so that
> +equivalent urls that are simply spelled differently will match properly.

And this nicely ties up the open questions I had after re-reading the list. Good.

We could define "equivalent" here (the %-encoding thing is obvious, I think, but which components are case-sensitive and which are not is perhaps a bit subtle). I do not necessarily know that it is useful to the user, though, and is one more thing to confuse them. And somebody who really cares can look at the appropriate RFCs.

So this patch looks pretty good to me; the two points I raised above are how I would have done it, but they are relatively minor if you do not agree.

-Peff
Previous: Kyle J. McKayNext: Junio C Hamano
Message 3 of 11 in “[REQUEST 0/1] Requesting your signed-off-by”
  1. Kyle J. McKayJul 25, 2013
  2. 1/1 docs: update http.<url>.* options documentationKyle J. McKay, Jul 25, 2013
  3. Jeff KingJul 26, 2013
  4. Junio C HamanoJul 26, 2013
  5. Junio C HamanoJul 26, 2013
  6. Kyle J. McKayJul 26, 2013
  7. Jeff KingJul 26, 2013
  8. Kyle J. McKayJul 27, 2013
  9. Jeff KingJul 27, 2013
  10. Kyle J. McKayJul 27, 2013
  11. Kyle J. McKayJul 26, 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.