git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Jeff King <peff@peff.net>
To: "Kyle J. McKay" <mackyle@gmail.com>
Cc: git@vger.kernel.org
Subject: Re: [REQUEST 1/1] docs: update http.<url>.* options documentation
Date: Fri, 26 Jul 2013 00:37:48 -0400	[thread overview]
Message-ID: <20130726043748.GA20286@sigill.intra.peff.net> (raw)
In-Reply-To: <ec5ecd4fe44af87e83778ce8e297afe@f74d39fa044aa309eaea14b9f57fe79>

On Thu, Jul 25, 2013 at 03:39:13PM -0700, Kyle J. McKay wrote:

> 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.

> +--
> +. 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.

> +. 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

  reply	other threads:[~2013-07-26  4:37 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-25 22:39 [REQUEST 0/1] Requesting your signed-off-by Kyle J. McKay
2013-07-25 22:39 ` [REQUEST 1/1] docs: update http.<url>.* options documentation Kyle J. McKay
2013-07-26  4:37   ` Jeff King [this message]
2013-07-26  5:53     ` Junio C Hamano
2013-07-26  6:07       ` Junio C Hamano
2013-07-26  6:23     ` Kyle J. McKay
2013-07-26 22:27       ` Jeff King
2013-07-27  2:15         ` Kyle J. McKay
2013-07-27  2:43           ` Jeff King
2013-07-27  3:04             ` Kyle J. McKay
2013-07-26  6:42     ` Kyle J. McKay

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20130726043748.GA20286@sigill.intra.peff.net \
    --to=peff@peff.net \
    --cc=git@vger.kernel.org \
    --cc=mackyle@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).