<feed xmlns='http://www.w3.org/2005/Atom'>
<title>cgit, branch lf/filter</title>
<subtitle>A hyperfast web frontend for git repositories written in C.</subtitle>
<id>https://git.zx2c4.com/cgit/atom/?h=lf%2Ffilter</id>
<link rel='self' href='https://git.zx2c4.com/cgit/atom/?h=lf%2Ffilter'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/cgit/'/>
<updated>2014-01-14T11:01:11Z</updated>
<entry>
<title>tests/: Add t0111-filter.sh</title>
<updated>2014-01-14T11:01:11Z</updated>
<author>
<name>Lukas Fleischer</name>
<email>cgit@cryptocrack.de</email>
</author>
<published>2014-01-14T10:13:08Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/cgit/commit/?id=77ac382607ab9a8bbd410a560d853d58aca6daf1'/>
<id>urn:sha1:77ac382607ab9a8bbd410a560d853d58aca6daf1</id>
<content type='text'>
This adds basic tests for all types of exec filters.

Signed-off-by: Lukas Fleischer &lt;cgit@cryptocrack.de&gt;
</content>
</entry>
<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='https://git.zx2c4.com/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>makefile: auto-detect presence of various Lua, bsd</title>
<updated>2014-01-14T01:00:07Z</updated>
<author>
<name>Jason A. Donenfeld</name>
<email>Jason@zx2c4.com</email>
</author>
<published>2014-01-14T00:50:31Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/cgit/commit/?id=3488d124052f5c3ddef303ed5306ad6a458794c1'/>
<id>urn:sha1:3488d124052f5c3ddef303ed5306ad6a458794c1</id>
<content type='text'>
We favor LuaJIT over Lua. We disable Lua if neither can be found. We
error out if a particular Lua is specified via LUA_IMPLEMENTATION=JIT or
LUA_IMPLEMENTATION=VANILLA, but cannot be found. We print a status
message depending on what happens.

Also, we do not link against libdl on the BSDs, since they include it as
part of libc.

Signed-off-by: Jason A. Donenfeld &lt;Jason@zx2c4.com&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='https://git.zx2c4.com/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='https://git.zx2c4.com/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 gravatar scripts</title>
<updated>2014-01-14T01:00:07Z</updated>
<author>
<name>Jason A. Donenfeld</name>
<email>Jason@zx2c4.com</email>
</author>
<published>2014-01-10T05:17:09Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/cgit/commit/?id=e942a1622bddf3338096393c3906c1adc871d198'/>
<id>urn:sha1:e942a1622bddf3338096393c3906c1adc871d198</id>
<content type='text'>
The lua one is hugely faster than the python one, but both are included
for comparison.

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='https://git.zx2c4.com/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='https://git.zx2c4.com/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='https://git.zx2c4.com/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='https://git.zx2c4.com/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>
</feed>
