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

Re: [PATCH] v2: proxy-command support for git://

From
Linus Torvalds <torvalds@osdl.org>
Date
Nov 4, 2005, 22:15 UTC
Message-ID
<Pine.LNX.4.64.0511041409180.28804@g5.osdl.org>
In-Reply-To
<87hdas9ijp.fsf@briny.internal.ondioline.org>
On Fri, 4 Nov 2005, Paul Collins wrote:
Show 7 quoted lines
> 
>  * If the git config syntax is extended to allow dots in section or
>    key names:
> 
>      [proxy]
>      git.kernel.org = "ssh-to-bastion-proxy-command"
>      git.blargco.com = "blargco-proxy-command"
I would suggest
	[proxy]
		command = "ssh-to-bastion-proxy-command" for git.kernel.org

and then it's easy enough to just parse the value "proxy.command" with code like

	host = value;
	cmd = strstr(value, " for ");
	if (!cmd)
		return -1;
	*cmd = 0;
	cmd += 5;
which would do the right thing..
The thing is, it's not just ".". I could well imagine that you'd have
	[proxy]
		command="ssh" for "ssh://kernel.org/"
		command="proxy-command" for kernel.org
		command="myprotocol-command" for "my://"

which would actually allow you to literally add your own protocol names (it would see that the target starts with "my://", and decide that it shoul drun the "myprotocol-command" for the proxy).

I'd rather allow free-form strings for the values than for the key names. If we allow free-form key-names, then random text files suddenly often become valid (but strange) config files.

Right now the non-free-form key names are the strongest syntax checker of the whole protocol.

		Linus
Previous: Paul CollinsNext: Junio C Hamano
Message 12 of 13 in “RFC: proxy-command support for git://”
  1. RFC: proxy-command support for git://Paul Collins, Nov 3, 2005
  2. Junio C HamanoNov 3, 2005
  3. Linus TorvaldsNov 3, 2005
  4. Carl BaldwinNov 3, 2005
  5. Junio C HamanoNov 3, 2005
  6. Paul CollinsNov 4, 2005
  7. Junio C HamanoNov 4, 2005
  8. Junio C HamanoNov 4, 2005
  9. Paul CollinsNov 4, 2005
  10. Junio C HamanoNov 4, 2005
  11. Paul CollinsNov 4, 2005
  12. Linus TorvaldsNov 4, 2005
  13. git-proxy updates.Junio C Hamano, Nov 19, 2005

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.