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

Re: [PATCH] Introduce a filter-path argument to git-daemon, for doing custom path transformations

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 14, 2009, 18:23 UTC
Message-ID
<7vprgkarq5.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<9e0f31700903140739g26be7981lb0fa411cdd8029e6@mail.gmail.com>
Johan Sørensen <johan@johansorensen.com> writes:
Show 32 quoted lines
>> Do you run git-daemon from inetd, or standalone, by the way?
>
> Standalone.
>
>> I am wondering how well it would scale if you spawn an external "filter path"
>> script every time you get a request.
>
> A quick test of 250 consecutive requests with ls-remote to localhost
> (all without the --verbose flag), slowest run:
> - Baseline (no --filter-path agument): 3.39s
>
> $ cat filter.c
> #import "stdio.h"
> int main (int argc, char const *argv[]) {
> 	printf("%s", "/existing.git\0");
> 	return 0;
> }
> - 3.84s
>
> $ cat filter.rb
> #!/usr/bin/ruby
> print "/existing.git\0"
> - 4.76s
>
> So, obviously highly dependent on how long it takes the script to
> launch and how much work it does. And yes, neither of the above really
> does anything :) nor takes any increased cpu load into account
>
> Another approach is to keep the external script running and feed it on
> stdin, but that would involve a bit more micro-management of the
> external process. I will revisit that idea if I find out that's
> needed.

I actually was hoping (especially we have Dscho on Cc: list) that somebody like you would start suggesting a "plug in" approach to load .so files, which would lead to a easy-to-port dso support with the help from msysgit folks we can use later in other parts of the system (e.g. customizable filters used for diff textconv, clean/smudge, etc.)

Show 6 quoted lines
>> (by the way, "filter path" sounds as if it checks and conditionally
>> denies access to, or something like that, which is not what you are using
>> it for.  It is more about rewriting paths, a la mod_rewrite, and I think
>> the option is misnamed)
>
> Maybe --rewrite-script or --rewrite-command  instead?
Perhaps.
Previous: Johan SørensenNext: Johannes Schindelin
Message 10 of 14 in “Introduce a filter-path argument to git-daemon, for doing custom path transformations”
  1. Introduce a filter-path argument to git-daemon, for doing custom path transformationsJohan Sørensen, Mar 11, 2009
  2. Johannes SixtMar 11, 2009
  3. Introduce a filter-path argument to git-daemon, for doing custom path transformationsJohan Sørensen, Mar 12, 2009
  4. Johannes SchindelinMar 12, 2009
  5. Introduce a filter-path argument to git-daemon, for doing custom path transformationsJohan Sørensen, Mar 12, 2009
  6. Johannes SchindelinMar 12, 2009
  7. Johan SørensenMar 12, 2009
  8. Junio C HamanoMar 14, 2009
  9. Johan SørensenMar 14, 2009
  10. Junio C HamanoMar 14, 2009
  11. Johannes SchindelinMar 19, 2009
  12. Johan SørensenMar 19, 2009
  13. Johannes SchindelinMar 20, 2009
  14. Johan SørensenMar 12, 2009

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.