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

Re: remote#branch

From
Theodore Tso <tytso@mit.edu>
Date
Oct 29, 2007, 21:49 UTC
Message-ID
<20071029214925.GH21133@thunk.org>
In-Reply-To
<alpine.LFD.0.999.0710291112590.30120@woody.linux-foundation.org>
On Mon, Oct 29, 2007 at 11:17:12AM -0700, Linus Torvalds wrote:
Show 7 quoted lines
> Git remote names already aren't "url"s in the http sense. 
> 
> We say "master:some.host/file/goes here/without/any/stupid/web-escapes" 
> for the ssh names, and the same goes for "file:///name here" etc.
> 
> People who think that git URL's are web-pages had better wake up and smell 
> the coffee. They aren't. They never were. They never *should* be.

Well, the confusion is that we refer to things that look like "git://git.kernel.org/pub/scm/git/git.git" as if it were a URL. In fact, you did so yourself in the last paragraph above. "People who think that git URL's".... but in fact, whether or not Universal Resource Locators (URL's) in the RFC 3986 sense requires quoting doesn't matter whether or not they are web pages or not. If they are formal URL's in the sense of RFC 3986, it doesn't matter whether they are http URL's, or ldap URL's, or telephone URL's, etc. they are supposed to be quoted whether or not they appear in a web form or not. The whole point of URL's is that they are *uniform*.

So what that means is the much more correct statement is:

"People who think the names that people specify that to git, which sometimes include names that look very much like URL's, especially when they begin 'git://' or 'http://', and they think they are really RFC 3986 URL's had better wake up and smell the coffee. They aren't. They never were. The they never *should* be.

The best that we can say given existing usage is that what git accepts is a superset of what is allowable by RFC 3986 syntactically, and that git in general doesn't do any URL-style quoting, even when given a name that looks syntactically like a http-style URL that begins 'http://'."

What this means in practice though is that people would be well advised not to pick locator names (NOT URL's) that contain characters that normally would require escaping by RFC 3986 rules, since the inconsistency of whether tools that expect URL-style quoting rules will probably cause user and tools confusion. Hence, it would probably be a bad idea to place a directory pathname that included the '#' character on a web server and expect that resulting git:// and http:// names generated by an Apache web server and gitweb scripts to do sane things, not to mention direct access via git:// names used when you do a "git push" to said respository. Sometimes the name will require RFC 3968 quoting, and sometimes it may not be quoted using RFC 3968 rules, depending on which tool you are using.

I do agree that the Cogito '#' notation makes things worse, not better, because it encourages a bigger separation between the RFC 3986 rules, and what the git tool accepts in practice --- which are not URL's, no matter how much some of our git-style names superficially look like URL's.

							- Ted
Previous: Linus TorvaldsNext: Linus Torvalds
Message 15 of 75 in “Git homepage: remove all the references to Cogito”
  1. Git homepage: remove all the references to CogitoPaolo Ciarrocchi, Oct 15, 2007
  2. Petr BaudisOct 16, 2007
  3. Matthieu MoyOct 16, 2007
  4. Paolo CiarrocchiOct 16, 2007
  5. gitweb: Speed up get_projects_list for large source treesLuke Lu, Oct 16, 2007
  6. Andreas EricssonOct 16, 2007
  7. Petr BaudisOct 16, 2007
  8. cogito and remote#branch, was Re: [PATCH] Git homepage: remove all the references to CogitoJohannes Schindelin, Oct 16, 2007
  9. Jan HudecOct 16, 2007
  10. Johannes SchindelinOct 16, 2007
  11. Jan HudecOct 27, 2007
  12. Johannes SchindelinOct 27, 2007
  13. Jan HudecOct 29, 2007
  14. Linus TorvaldsOct 29, 2007
  15. Theodore TsoOct 29, 2007
  16. Linus TorvaldsOct 29, 2007
  17. Johannes SchindelinOct 29, 2007
  18. Theodore TsoOct 30, 2007
  19. Junio C HamanoOct 30, 2007
  20. Theodore TsoOct 30, 2007
  21. Linus TorvaldsOct 30, 2007
  22. Tom PrinceOct 30, 2007
  23. Linus TorvaldsOct 30, 2007
  24. Tom PrinceOct 30, 2007
  25. Linus TorvaldsOct 30, 2007
  26. Matthieu MoyOct 30, 2007
  27. Linus TorvaldsOct 30, 2007
  28. Linus TorvaldsOct 30, 2007
  29. Pascal ObryOct 30, 2007
  30. Linus TorvaldsOct 30, 2007
  31. Randal L. SchwartzOct 30, 2007
  32. Linus TorvaldsOct 30, 2007
  33. Nicolas PitreOct 30, 2007
  34. Jeff KingOct 30, 2007
  35. Jakub NarebskiOct 31, 2007
  36. Jeff KingOct 31, 2007
  37. Jakub NarebskiOct 31, 2007
  38. Jeff KingOct 31, 2007
  39. Andreas EricssonOct 31, 2007
  40. Mike HommeyOct 31, 2007
  41. Andreas EricssonOct 31, 2007
  42. Mike HommeyOct 31, 2007
  43. Jakub NarebskiNov 1, 2007
  44. Theodore TsoNov 1, 2007
  45. Andreas EricssonNov 1, 2007
  46. Pascal ObryOct 31, 2007
  47. David KastrupOct 31, 2007
  48. Linus TorvaldsOct 31, 2007
  49. Jeff KingOct 31, 2007
  50. Linus TorvaldsOct 31, 2007
  51. Jeff KingOct 31, 2007
  52. Linus TorvaldsOct 31, 2007
  53. Andreas EricssonOct 31, 2007
  54. Jeff KingOct 31, 2007
  55. David KastrupOct 31, 2007
  56. Wincent ColaiutaOct 31, 2007
  57. Robin RosenbergOct 31, 2007
  58. Pascal ObryOct 31, 2007
  59. Petr BaudisOct 31, 2007
  60. Pascal ObryOct 30, 2007
  61. Jan HudecOct 30, 2007
  62. Linus TorvaldsOct 30, 2007
  63. Erik WarendorphOct 31, 2007
  64. Johannes SchindelinOct 30, 2007
  65. Martin LanghoffOct 31, 2007
  66. Linus TorvaldsOct 31, 2007
  67. Jeff KingOct 31, 2007
  68. Martin LanghoffOct 31, 2007
  69. Jeff KingOct 31, 2007
  70. Johannes SchindelinOct 31, 2007
  71. Linus TorvaldsOct 30, 2007
  72. Johannes SchindelinOct 29, 2007
  73. Jonas FonsecaOct 16, 2007
  74. Petr BaudisOct 31, 2007
  75. Jonas FonsecaOct 31, 2007

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.