git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Erik Warendorph <erik@warendorph.org>
To: Jan Hudec <bulb@ucw.cz>
Cc: Linus Torvalds <torvalds@linux-foundation.org>,
	Tom Prince <tom.prince@ualberta.net>,
	Theodore Tso <tytso@mit.edu>, Junio C Hamano <gitster@pobox.com>,
	Johannes Schindelin <Johannes.Schindelin@gmx.de>,
	Petr Baudis <pasky@suse.cz>,
	Paolo Ciarrocchi <paolo.ciarrocchi@gmail.com>,
	git@vger.kernel.org
Subject: Re: remote#branch
Date: Wed, 31 Oct 2007 20:29:01 +0100	[thread overview]
Message-ID: <20071031192901.GA12832@localhost.localdomain> (raw)
In-Reply-To: <20071030193610.GA4442@efreet.light.src>

* Jan Hudec <bulb@ucw.cz> [2007-10-30 20:36:10 +0100]:
>
> On Tue, Oct 30, 2007 at 07:59:45 -0700, Linus Torvalds wrote:
> > > So, how should git deal with
> > >
> > > git://repo.or.cz/linux-2.6/linux acpi-2.6/ibm-acpi-2.6.git
> > > git://repo.or.cz/linux-2.6/linux+acpi-2.6/ibm-acpi-2.6.git
> > > git://repo.or.cz/linux-2.6/linux%20acpi-2.6/ibm-acpi-2.6.git
> >
> > The way it has always cared. Git itself does no quoting what-so-ever
> > (except for the *argument* quoting etc that it needs).
> >
> > Now, the *transport* back-end may end up quoting it, of course, the same
> > way it may end up using some random protocol. The user shouldn't care
> > about the implementation details!
> >
> > In the case of the git transport, there is no quoting even by the
> > transport protocol. In the case of http, libcurl would hopefully quote for
> > us.
>
> So the three addresses will all be different, right?
>
> > > compared to
> > >
> > > http://repo.or.cz/linux-2.6/linux acpi-2.6/ibm-acpi-2.6.git
> > > http://repo.or.cz/linux-2.6/linux+acpi-2.6/ibm-acpi-2.6.git
> > > http://repo.or.cz/linux-2.6/linux%20acpi-2.6/ibm-acpi-2.6.git
> >
> > No difference, what-so-ever, that I can see. Git doesn't quote it.
>
> Yes. But the server will unquote it. ' ' should not have been there, but it's
> just passed through if it was. '+' is quoting for ' ' and '%20' is quoting
> for ' ' as well. Therefore all these three addresses are the *SAME*.
>
> Now the user expectation will be that when these are the same, the git://
> ones above will be as well. But they are not. This is not about following any
> RFC for sake of it, but about being consistent with ourselves.

I don't think the

  '+' is quoting for ' '

part is fully correct, at least not if you're talking about
"real RFC 2396 URLs" (not "Git URLs").  I might misunderstand
you here, but there has also been other postings suggesting
that plus should/could be used instead of space, implying that
people think that pluses are always transformed to spaces in
URLs.  But if I understand RFC 2396 correctly, this is *not*
the case.

RFC 2396 says that pluses are treated as "reserved" in the
*query* part of the URL (ie on the right side of the question
mark) -- here they *are* transformed to spaces, although the
RFC itself doesn't really say specifically what happens to
them.  In the path part, pluses are not "reserved", they are
simply a "pchar" along with "unreserved", "escaped" and a
couple of other characters.  There is nothing in the RFC
implying that pluses in the path part will be transformed into
spaces, and in my experience this does not happen in practice
either.

To recap:

  (In the examples below <...> is used to mean legal URLs,
  while "..." is used to mean "the literal characters in the
  URL" (more or less))

  * In the query part:

      '%20' = '+' = a literal space
      '%2B' =       a literal plus

    For example:

        <http://example.com/somescript?v=x%20y>
      = <http://example.com/somescript?v=x+y>
      = "http://example.com/somescript?v=x y"

        <http://example.com/somescript?v=x%2By>
      = "http://example.com/somescript?v=x+y"

  * In the path part:

      '%20' =       a literal space
      '%2B' = '+' = a literal plus

    For example:

        <http://example.com/x%20y.html>
      = "http://example.com/x y.html"

        <http://example.com/x%2By>
      = <http://example.com/x+y>
      = "http://example.com/x+y"

I'm not advocating that "Git URLs" necessarily should be made
fully RFC 2396 compliant (neither am I nitpicking just for the
sake of nitpicking), I'm just pointing out that if someone
*should* want to make "Git URLs" fully or more RFC 2396
compliant in some way for some reason, having pluses being
automatically transformed to spaces in the path part of the URL
does not follow the RFC (as far as I understand it).

-- 
Erik Warendorph <erik@warendorph.org>

  parent reply	other threads:[~2007-10-31 19:49 UTC|newest]

Thread overview: 75+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-15 21:38 [PATCH] Git homepage: remove all the references to Cogito Paolo Ciarrocchi
2007-10-16  2:19 ` Petr Baudis
2007-10-16  7:50   ` Matthieu Moy
2007-10-16  8:01     ` Paolo Ciarrocchi
2007-10-16  9:04     ` [PATCH] gitweb: Speed up get_projects_list for large source trees Luke Lu
2007-10-16 16:55       ` Andreas Ericsson
2007-10-16 23:20       ` Petr Baudis
2007-10-16 10:49   ` cogito and remote#branch, was Re: [PATCH] Git homepage: remove all the references to Cogito Johannes Schindelin
2007-10-16 21:09     ` remote#branch Jan Hudec
2007-10-16 21:35       ` remote#branch Johannes Schindelin
2007-10-27 20:47         ` remote#branch Jan Hudec
2007-10-27 23:01           ` remote#branch Johannes Schindelin
2007-10-29 17:40             ` remote#branch Jan Hudec
2007-10-29 18:17               ` remote#branch Linus Torvalds
2007-10-29 21:49                 ` remote#branch Theodore Tso
2007-10-29 22:57                   ` remote#branch Linus Torvalds
2007-10-29 23:49                     ` remote#branch Johannes Schindelin
2007-10-30  3:01                     ` remote#branch Theodore Tso
2007-10-30  3:40                       ` remote#branch Junio C Hamano
2007-10-30  4:40                         ` remote#branch Theodore Tso
2007-10-30  4:51                           ` remote#branch Linus Torvalds
2007-10-30  5:37                             ` remote#branch Tom Prince
2007-10-30 14:59                               ` remote#branch Linus Torvalds
2007-10-30 16:02                                 ` remote#branch Tom Prince
2007-10-30 17:39                                   ` remote#branch Linus Torvalds
2007-10-30 17:49                                     ` remote#branch Matthieu Moy
2007-10-30 17:58                                       ` remote#branch Linus Torvalds
2007-10-30 18:19                                         ` remote#branch Linus Torvalds
2007-10-30 19:18                                         ` remote#branch Pascal Obry
2007-10-30 19:38                                           ` remote#branch Linus Torvalds
2007-10-30 20:15                                             ` remote#branch Randal L. Schwartz
2007-10-30 20:30                                               ` remote#branch Linus Torvalds
2007-10-30 20:36                                               ` remote#branch Nicolas Pitre
2007-10-30 23:58                                             ` remote#branch Jeff King
2007-10-31  0:12                                               ` remote#branch Jakub Narebski
2007-10-31  1:38                                                 ` remote#branch Jeff King
2007-10-31  1:49                                                   ` remote#branch Jakub Narebski
2007-10-31  1:57                                                     ` remote#branch Jeff King
2007-10-31  7:09                                                       ` remote#branch Andreas Ericsson
2007-10-31  8:35                                                         ` remote#branch Mike Hommey
2007-10-31  9:03                                                           ` remote#branch Andreas Ericsson
2007-10-31  9:15                                                             ` remote#branch Mike Hommey
2007-11-01  0:22                                                               ` remote#branch Jakub Narebski
2007-11-01  5:11                                                                 ` remote#branch Theodore Tso
2007-11-01  7:29                                                               ` remote#branch Andreas Ericsson
2007-10-31  9:33                                                       ` remote#branch Pascal Obry
2007-10-31  6:42                                                 ` remote#branch David Kastrup
2007-10-31 15:28                                                   ` remote#branch Linus Torvalds
2007-10-31 20:47                                                     ` remote#branch Jeff King
2007-10-31 21:01                                                       ` remote#branch Linus Torvalds
2007-10-31 21:26                                                         ` remote#branch Jeff King
2007-10-31 21:28                                                         ` remote#branch Linus Torvalds
2007-10-31 21:07                                                       ` remote#branch Andreas Ericsson
2007-10-31 21:31                                                         ` remote#branch Jeff King
2007-10-31  6:39                                               ` remote#branch David Kastrup
2007-10-31  8:16                                                 ` remote#branch Wincent Colaiuta
2007-10-31  8:25                                                 ` remote#branch Robin Rosenberg
2007-10-31  9:34                                                 ` remote#branch Pascal Obry
2007-10-31 17:13                                               ` remote#branch Petr Baudis
2007-10-30 19:15                                     ` remote#branch Pascal Obry
2007-10-30 19:36                                 ` remote#branch Jan Hudec
2007-10-30 19:53                                   ` remote#branch Linus Torvalds
2007-10-31 19:29                                   ` Erik Warendorph [this message]
2007-10-30 10:02                             ` remote#branch Johannes Schindelin
2007-10-31  0:41                             ` remote#branch Martin Langhoff
2007-10-31  0:59                               ` remote#branch Linus Torvalds
2007-10-31  1:43                               ` remote#branch Jeff King
2007-10-31  1:49                                 ` remote#branch Martin Langhoff
2007-10-31  1:59                                   ` remote#branch Jeff King
2007-10-31  3:08                                 ` remote#branch Johannes Schindelin
2007-10-30  4:50                       ` remote#branch Linus Torvalds
2007-10-29 18:32               ` remote#branch Johannes Schindelin
2007-10-16 22:16     ` cogito and remote#branch, was Re: [PATCH] Git homepage: remove all the references to Cogito Jonas Fonseca
2007-10-31 17:09       ` Petr Baudis
2007-10-31 21:17         ` Jonas Fonseca

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=20071031192901.GA12832@localhost.localdomain \
    --to=erik@warendorph.org \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=bulb@ucw.cz \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=paolo.ciarrocchi@gmail.com \
    --cc=pasky@suse.cz \
    --cc=tom.prince@ualberta.net \
    --cc=torvalds@linux-foundation.org \
    --cc=tytso@mit.edu \
    /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).