Thread (4 messages) flat view 4 messages, 3 authors, 2016-06-15

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

From: Johan Sørensen <hidden>
Date: 2016-06-15 22:46:25

2009/3/19 Johannes Schindelin [off-list ref]:
quoted
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.)
I do not like that at all.  Dynamic libraries -- especially on Windows --
are a major hassle.

However, I cannot think of anything Johan might want to do that would not
be possible using a bunch of regular expressions together with
substitions.
Let me reiterate my use-case then: I need to dynamically substitute
one path with another. Perhaps "map" paints a better picture than
"substitute" here. Please refer to my second mail in this thread for
more details.

The only way I can see regexps work, is that if they're read, on a
per-request basis (reloading git-daemon every time they change is just
silly), from somewhere outside the git-daemon. Then, you might as well
take the full-on approach this patch provides.

Cheers,
JS

FWIW I have experimental code in my personal tree that sports
strbuf_regsub(), a function to replace matches of a regular expression
(possibly with groups) by a given string (which may contain \0 .. \9,
being replaced with the respective group's contents).

Ciao,
Dscho
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help