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

Re: [PATCH] git-daemon: more powerful base-path/user-path settings, using formats.

From
Jon Loeliger <jdl@jdl.com>
Date
Aug 27, 2006, 21:49 UTC
Message-ID
<E1GHSVZ-00070W-HI@jdl.com>
The other day, Junio lamented:
> I have to admit that I kinda liked JDL's simpler one first (and
> it has been in production use for some time).  We'll see.

I think the two aspects of my implementation that are favorable are the slightly more general table-driven string interplotion routine and the generalization of the interface to the upload() call here:

    @@ -310,8 +377,14 @@ #endif
    	if (len && line[len-1] == '\n')
    		line[--len] = 0;
     
    -	if (!strncmp("git-upload-pack ", line, 16))
    -		return upload(line+16);
    +	if (len != pktlen) {
    +	    parse_extra_args(line + len + 1, pktlen - len - 1);
    +	}
    +
    +	if (!strncmp("git-upload-pack ", line, 16)) {
    +		interp_table[INTERP_SLOT_DIR].value = line+16;
    +		return upload(interp_table);
    +	}

Naturally, I only placed entries into the interpolation table that I needed to get my code working, but it could easily be extended and filled with additional entries such as the %u for user paths and %IP for IP address, etc. I might even recommend some form of lower-case-izing option too.

In any event, we should clearly attempt to unify my proposed implementation with Pierre's proposal.

jdl
Message 1 of 1 in “Re: [PATCH] git-daemon: more powerful base-path/user-path settings, using formats.”
  1. Jon LoeligerAug 27, 2006

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.