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

Re: remote#branch

From
Linus Torvalds <torvalds@linux-foundation.org>
Date
Oct 30, 2007, 14:59 UTC
Message-ID
<alpine.LFD.0.999.0710300738550.30120@woody.linux-foundation.org>
In-Reply-To
<20071030053732.GA16963@hermes.priv>
On Tue, 30 Oct 2007, Tom Prince wrote:
Show 7 quoted lines
> > The push url is generally written as
> > 
> > 	repo.or.cz:/srv/git/linux-2.6/linux-acpi-2.6/ibm-acpi-2.6.git
> > 
> > Tough.
> 
> But gitweb (on git.kernel.org and repo.or.cz) both give git:// locators.
Yes, for anonymous pulling.
The thing is, git takes something much more extended than a "RFC url".

We use pathnames. Not a "quoted mess". Regular, bog-standard, normal unix pathnames.

On Windows, I assume (and hope) that git uses the native-style Windows pathnames, and you can do "git pull d:\system\ugh" if you want to.

And I think we should care a whole lot about interacting with the *user* and actual programs that git shares code with, than interacting with some idiotic RFC that has absolutely zero to do with us, regardless of whether we use the name "url" or not.

For example, the reason we use "host:/path" for pushing over ssh (and pulling, for that matter), is that that's the same syntax that scp uses. It's a natural fit. And I hope to God nobody seriously argues that we shouldn't use regular pathnames on the local disk?

> > Quick! WHO THE F*CK CARES?
[ Btw, sorry for the french. I blame being tired and ina bad mood, but I 
  also blame the fact that I absolutely *detest* arguments based on 
  standards. If you cannot back it up with a real usage scenario, you 
  shouldn't even mention the standard ]
Show 5 quoted lines
> 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.

Show 5 quoted lines
> 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.

Notice how the fact that we use http:// doesn't actually mean that you can feed the result to a web browser anyway? It's not like you get a "link" that git follows. You get a name.

Yes, you can try to "co-locate" things so that something smart disambiguates (maybe have an "index.html" file, so a web browser gets a gitweb page, and git gets the raw data). But even then, notice how even web browser will do the quoting for you: try

	firefox "http://www.google.com/search?q=Html spaces"
just for fun.
Notice? The thing is, "strict RFC following" makes no sense:
 - the git syntax is (and HAS TO BE to be user friendly) a real extension 
   on any "strict RFC URL" anyway, since it is a lot more important to 
   interact well with normal unix tools (ie use regular filenames, and use 
   the same syntax as "cp", "mv" and "find" etc uses!)
   Ergo: we cannot and MUST NOT care about the "URL RFC" too deeply 
   anyway.
 - 
> Not that I care, but git should probably handle things consistently.

Git has been, and *is* entirely consistent. It uses convenient repo names. If you don't want to call them url's, then call them "repository name". Call them whatever. But they are 100% obvious, even if there are multiple forms of them (and *none* of the forms do any quoting at all):

 - <remote shorthand> ("origin")
 - <path> ("../git.git")
 - <host>:<path> ("master.kernel.org:/pub/scm/...")
 - <protocol>://<host>/<path> ("git://repo.or.cz/...")
See? We may not follow RFC's, but we follow "easy to use".

And btw, that's really much much MUCH more important. It's why the git config file is in a "ini"-like format. It's readable. It's not the insane RFC crap that would result if somebody had decided that standards are more important than being sane.

			Linus
Previous: Tom PrinceNext: Tom Prince
Message 23 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.