All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jon Loeliger <jdl@jdl.com>
To: git@vger.kernel.org
Subject: Re: [PATCH] git-daemon: more powerful base-path/user-path settings, using formats.
Date: Sun, 27 Aug 2006 16:49:33 -0500	[thread overview]
Message-ID: <E1GHSVZ-00070W-HI@jdl.com> (raw)
In-Reply-To: 7v64gexxgl.fsf@assigned-by-dhcp.cox.net


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

             reply	other threads:[~2006-08-27 21:49 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-08-27 21:49 Jon Loeliger [this message]
  -- strict thread matches above, loose matches on Subject: below --
2006-08-23 20:11 [PATCH] git-daemon virtual hosting implementation Junio C Hamano
2006-08-23 23:32 ` [PATCH] git-daemon: more powerful base-path/user-path settings, using formats Pierre Habouzit
2006-08-24  0:17   ` Junio C Hamano
2006-08-24  7:50     ` Pierre Habouzit
2006-08-27  6:12   ` Junio C Hamano
2006-08-27 10:28     ` Pierre Habouzit
2006-08-27 10:52       ` Junio C Hamano
2006-08-27 11:40         ` Pierre Habouzit
2006-08-27 15:30           ` Jakub Narebski
2006-08-27 16:26             ` Pierre Habouzit
2006-08-27 16:06         ` Randal L. Schwartz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E1GHSVZ-00070W-HI@jdl.com \
    --to=jdl@jdl.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.