{"thread":{"id":"5413","subject":"Re: [PATCH] git-daemon: more powerful base-path/user-path settings, using formats.","startedAt":"2006-08-27T21:49:33Z","lastAt":"2006-08-27T21:49:33Z","messageCount":1,"participants":["Jon Loeliger"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"26006","messageId":"E1GHSVZ-00070W-HI@jdl.com","threadId":"5413","inReplyTo":null,"subject":"Re: [PATCH] git-daemon: more powerful base-path/user-path settings, using formats.","fromName":"Jon Loeliger","fromEmail":"jdl@jdl.com","sentAt":"2006-08-27T21:49:33Z","receivedAt":"2006-08-27T21:49:33Z","isPatch":true,"sender":{"key":"jdl@jdl.com","avatar":"https://gravatar.com/avatar/75ce9a10b151acd2c28ec4ab2136dba7b2ff1634530bd04b155981a749d08a64?d=mp&s=160"},"body":"\nThe other day, Junio lamented:\n> I have to admit that I kinda liked JDL's simpler one first (and\n> it has been in production use for some time).  We'll see.\n\nI think the two aspects of my implementation that are\nfavorable are the slightly more general table-driven string\ninterplotion routine and the generalization of the interface\nto the upload() call here:\n\n    @@ -310,8 +377,14 @@ #endif\n    \tif (len && line[len-1] == '\\n')\n    \t\tline[--len] = 0;\n     \n    -\tif (!strncmp(\"git-upload-pack \", line, 16))\n    -\t\treturn upload(line+16);\n    +\tif (len != pktlen) {\n    +\t    parse_extra_args(line + len + 1, pktlen - len - 1);\n    +\t}\n    +\n    +\tif (!strncmp(\"git-upload-pack \", line, 16)) {\n    +\t\tinterp_table[INTERP_SLOT_DIR].value = line+16;\n    +\t\treturn upload(interp_table);\n    +\t}\n\n\nNaturally, I only placed entries into the interpolation table\nthat I needed to get my code working, but it could easily be\nextended and filled with additional entries such as the %u for\nuser paths and %IP for IP address, etc.  I might even recommend\nsome form of lower-case-izing option too.\n\nIn any event, we should clearly attempt to unify my proposed\nimplementation with Pierre's proposal.\n\njdl\n"}]}