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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]