<feed xmlns='http://www.w3.org/2005/Atom'>
<title>cgit/filter.c, branch lf/filter</title>
<subtitle>A hyperfast web frontend for git repositories written in C.</subtitle>
<id>http://git.cetero.st/cgit/atom/filter.c?h=lf%2Ffilter</id>
<link rel='self' href='http://git.cetero.st/cgit/atom/filter.c?h=lf%2Ffilter'/>
<link rel='alternate' type='text/html' href='http://git.cetero.st/cgit/'/>
<updated>2014-01-14T01:05:14Z</updated>
<entry>
<title>filter: refactor cgit_new_filter()</title>
<updated>2014-01-14T01:05:14Z</updated>
<author>
<name>Lukas Fleischer</name>
<email>cgit@cryptocrack.de</email>
</author>
<published>2014-01-13T23:29:07Z</published>
<link rel='alternate' type='text/html' href='http://git.cetero.st/cgit/commit/?id=80f87c1003a4c58dc7e516d77598cd0213127c02'/>
<id>urn:sha1:80f87c1003a4c58dc7e516d77598cd0213127c02</id>
<content type='text'>
Use prefixcmp() as a preparation for using strip_prefix() later. Also,
interpret the command as a file name if it contains a colon but none of
the filter prefixes matches instead of bailing out and adding a special
check for Windows.

Signed-off-by: Lukas Fleischer &lt;cgit@cryptocrack.de&gt;
</content>
</entry>
<entry>
<title>filter: style tweaks</title>
<updated>2014-01-14T01:00:07Z</updated>
<author>
<name>Jason A. Donenfeld</name>
<email>Jason@zx2c4.com</email>
</author>
<published>2014-01-13T22:54:28Z</published>
<link rel='alternate' type='text/html' href='http://git.cetero.st/cgit/commit/?id=d3c0370a3f108121642d02bbd190ce676bb4772b'/>
<id>urn:sha1:d3c0370a3f108121642d02bbd190ce676bb4772b</id>
<content type='text'>
Signed-off-by: Jason A. Donenfeld &lt;Jason@zx2c4.com&gt;
</content>
</entry>
<entry>
<title>filter: add page source to email filter</title>
<updated>2014-01-14T01:00:07Z</updated>
<author>
<name>Jason A. Donenfeld</name>
<email>Jason@zx2c4.com</email>
</author>
<published>2014-01-13T15:24:40Z</published>
<link rel='alternate' type='text/html' href='http://git.cetero.st/cgit/commit/?id=786609bd36c07b85dbf905fc8c36eba7132122d7'/>
<id>urn:sha1:786609bd36c07b85dbf905fc8c36eba7132122d7</id>
<content type='text'>
Since the email filter is called from lots of places, the script might
benefit from knowing the origin. That way it can modify its contents
and/or size depending.

Signed-off-by: Jason A. Donenfeld &lt;Jason@zx2c4.com&gt;
</content>
</entry>
<entry>
<title>filter: add support for email filter</title>
<updated>2014-01-14T01:00:07Z</updated>
<author>
<name>Jason A. Donenfeld</name>
<email>Jason@zx2c4.com</email>
</author>
<published>2014-01-13T03:04:52Z</published>
<link rel='alternate' type='text/html' href='http://git.cetero.st/cgit/commit/?id=a5e15537268410e268c7b26aa69d03b347c326c8'/>
<id>urn:sha1:a5e15537268410e268c7b26aa69d03b347c326c8</id>
<content type='text'>
Signed-off-by: Jason A. Donenfeld &lt;Jason@zx2c4.com&gt;
</content>
</entry>
<entry>
<title>filter: return on null filter from open and close</title>
<updated>2014-01-14T01:00:07Z</updated>
<author>
<name>Jason A. Donenfeld</name>
<email>Jason@zx2c4.com</email>
</author>
<published>2014-01-13T02:56:50Z</published>
<link rel='alternate' type='text/html' href='http://git.cetero.st/cgit/commit/?id=800380dde797ae35d738a644acdae2fabb9a0d44'/>
<id>urn:sha1:800380dde797ae35d738a644acdae2fabb9a0d44</id>
<content type='text'>
So that we don't have to include the if(filter) open_filter(filter)
block everywhere, we introduce the guard in the function itself. This
should simplify quite a bit of code.

Signed-off-by: Jason A. Donenfeld &lt;Jason@zx2c4.com&gt;
</content>
</entry>
<entry>
<title>filter: add lua support</title>
<updated>2014-01-14T01:00:07Z</updated>
<author>
<name>Jason A. Donenfeld</name>
<email>Jason@zx2c4.com</email>
</author>
<published>2014-01-13T13:18:51Z</published>
<link rel='alternate' type='text/html' href='http://git.cetero.st/cgit/commit/?id=f43b228d0bca5791be98ff3fbb2f8743219635b6'/>
<id>urn:sha1:f43b228d0bca5791be98ff3fbb2f8743219635b6</id>
<content type='text'>
Signed-off-by: Jason A. Donenfeld &lt;Jason@zx2c4.com&gt;
</content>
</entry>
<entry>
<title>filter: basic write hooking infrastructure</title>
<updated>2014-01-14T01:00:07Z</updated>
<author>
<name>Jason A. Donenfeld</name>
<email>Jason@zx2c4.com</email>
</author>
<published>2014-01-13T13:16:18Z</published>
<link rel='alternate' type='text/html' href='http://git.cetero.st/cgit/commit/?id=e83b51b4f6bd53efea0c772e6ecdf1c5605ca611'/>
<id>urn:sha1:e83b51b4f6bd53efea0c772e6ecdf1c5605ca611</id>
<content type='text'>
Filters can now call hook_write and unhook_write if they want to
redirect writing to stdout to a different function. This saves us from
potential file descriptor pipes and other less efficient mechanisms.

We do this instead of replacing the call in html_raw because some places
stdlib's printf functions are used (ui-patch or within git itself),
which has its own internal buffering, which makes it difficult to
interlace our function calls. So, we dlsym libc's write and then
override it in the link stage.

While we're at it, we move considerations of argument count into the
generic new filter handler.

Signed-off-by: Jason A. Donenfeld &lt;Jason@zx2c4.com&gt;
</content>
</entry>
<entry>
<title>filter: allow for cleanup hook for filter types</title>
<updated>2014-01-14T01:00:07Z</updated>
<author>
<name>Jason A. Donenfeld</name>
<email>Jason@zx2c4.com</email>
</author>
<published>2014-01-12T19:58:21Z</published>
<link rel='alternate' type='text/html' href='http://git.cetero.st/cgit/commit/?id=d750c7a2c9bb83cfc47c0d74fcee61f0a5042aa9'/>
<id>urn:sha1:d750c7a2c9bb83cfc47c0d74fcee61f0a5042aa9</id>
<content type='text'>
At some point, we're going to want to do lazy deallocation of filters.
For example, if we implement lua, we'll want to load the lua runtime
once for each filter, even if that filter is called many times.
Similarly, for persistent exec filters, we'll want to load it once,
despite many open_filter and close_filter calls, and only reap the child
process at the end of the cgit process. For this reason, we add here a
cleanup function that is called at the end of cgit's main().

Signed-off-by: Jason A. Donenfeld &lt;Jason@zx2c4.com&gt;
</content>
</entry>
<entry>
<title>filter: introduce "filter type" prefix</title>
<updated>2014-01-14T01:00:07Z</updated>
<author>
<name>John Keeping</name>
<email>john@keeping.me.uk</email>
</author>
<published>2014-01-12T17:13:53Z</published>
<link rel='alternate' type='text/html' href='http://git.cetero.st/cgit/commit/?id=4bb87cbf17588ec91b46bf0ef0be01672e9be787'/>
<id>urn:sha1:4bb87cbf17588ec91b46bf0ef0be01672e9be787</id>
<content type='text'>
This allows different filter implementations to be specified in the
configuration file.  Currently only "exec" is supported, but it may now
be specified either with or without the "exec:" prefix.

Signed-off-by: John Keeping &lt;john@keeping.me.uk&gt;
</content>
</entry>
<entry>
<title>filter: add interface layer</title>
<updated>2014-01-14T01:00:07Z</updated>
<author>
<name>John Keeping</name>
<email>john@keeping.me.uk</email>
</author>
<published>2014-01-12T17:13:52Z</published>
<link rel='alternate' type='text/html' href='http://git.cetero.st/cgit/commit/?id=7bd90b8048fd6937766dff7474947dd80205ea7e'/>
<id>urn:sha1:7bd90b8048fd6937766dff7474947dd80205ea7e</id>
<content type='text'>
Change the existing cgit_{open,close,fprintf}_filter functions to
delegate to filter-specific implementations accessed via function
pointers on the cgit_filter object.

We treat the "exec" filter type slightly specially here by putting its
structure definition in the header file and providing an "init" function
to set up the function pointers.  This is required so that the
ui-snapshot.c code that applies a compression filter can continue to use
the filter interface to do so.

Signed-off-by: John Keeping &lt;john@keeping.me.uk&gt;
</content>
</entry>
</feed>
