<feed xmlns='http://www.w3.org/2005/Atom'>
<title>cgit/cgit.h, branch v0.10.2</title>
<subtitle>A hyperfast web frontend for git repositories written in C.</subtitle>
<id>https://git.zx2c4.com/cgit/atom/cgit.h?h=v0.10.2</id>
<link rel='self' href='https://git.zx2c4.com/cgit/atom/cgit.h?h=v0.10.2'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/cgit/'/>
<updated>2014-02-20T18:56:44Z</updated>
<entry>
<title>Add a cache-snapshot-ttl configuration variable</title>
<updated>2014-02-20T18:56:44Z</updated>
<author>
<name>Lukas Fleischer</name>
<email>cgit@cryptocrack.de</email>
</author>
<published>2014-02-05T09:23:58Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/cgit/commit/?id=a3722ec3c6660ace9fe637d617a0ca225acfacbc'/>
<id>urn:sha1:a3722ec3c6660ace9fe637d617a0ca225acfacbc</id>
<content type='text'>
This can be used to specify the TTL for snapshots. Snapshots are usually
static and do not ever change. On the other hand, tarball generation is
CPU intensive.

One use case of this setting (apart from increasing the lifetime of
snapshot cache slots) is caching of snapshots while disabling the cache
for static/dynamic HTML pages (by setting TTL to zero for everything
except for snapshot requests).

Signed-off-by: Lukas Fleischer &lt;cgit@cryptocrack.de&gt;
</content>
</entry>
<entry>
<title>auth: add basic authentication filter framework</title>
<updated>2014-01-16T01:28:12Z</updated>
<author>
<name>Jason A. Donenfeld</name>
<email>Jason@zx2c4.com</email>
</author>
<published>2014-01-14T20:49:31Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/cgit/commit/?id=d6e9200cc35411f3f27426b608bcfdef9348e6d3'/>
<id>urn:sha1:d6e9200cc35411f3f27426b608bcfdef9348e6d3</id>
<content type='text'>
This leverages the new lua support. See
filters/simple-authentication.lua for explaination of how this works.
There is also additional documentation in cgitrc.5.txt.

Though this is a cookie-based approach, cgit's caching mechanism is
preserved for authenticated pages.

Very plugable and extendable depending on user needs.

The sample script uses an HMAC-SHA1 based cookie to store the
currently logged in user, with an expiration date.

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: 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>
<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='https://git.zx2c4.com/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: 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='https://git.zx2c4.com/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>
<entry>
<title>filter: add fprintf_filter function</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:51Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/cgit/commit/?id=632efb25c07c1b014a4e8cfbbea759f517c2aaf6'/>
<id>urn:sha1:632efb25c07c1b014a4e8cfbbea759f517c2aaf6</id>
<content type='text'>
This stops the code in cgit.c::print_repo needing to inspect the
cgit_filter structure, meaning that we can abstract out different filter
types that will have different fields that need to be printed.

Signed-off-by: John Keeping &lt;john@keeping.me.uk&gt;
</content>
</entry>
<entry>
<title>filter: pass extra arguments via cgit_open_filter</title>
<updated>2014-01-12T19:20:20Z</updated>
<author>
<name>John Keeping</name>
<email>john@keeping.me.uk</email>
</author>
<published>2014-01-12T17:13:50Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/cgit/commit/?id=3d8a6507ca542881a5e8b30ad6b7068a9c4fdeea'/>
<id>urn:sha1:3d8a6507ca542881a5e8b30ad6b7068a9c4fdeea</id>
<content type='text'>
This avoids poking into the filter data structure at various points in
the code.  We rely on the fact that the number of arguments is fixed
based on the filter type (set in cgit_new_filter) and that the call
sites all know which filter type they're using.

Signed-off-by: John Keeping &lt;john@keeping.me.uk&gt;
</content>
</entry>
<entry>
<title>filter: split filter functions into their own file</title>
<updated>2014-01-10T16:45:43Z</updated>
<author>
<name>Jason A. Donenfeld</name>
<email>Jason@zx2c4.com</email>
</author>
<published>2014-01-10T04:19:05Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/cgit/commit/?id=3eae406934b98ce78eff3a92cb410475d71095a3'/>
<id>urn:sha1:3eae406934b98ce78eff3a92cb410475d71095a3</id>
<content type='text'>
A first step for more interesting things.

Signed-off-by: Jason A. Donenfeld &lt;Jason@zx2c4.com&gt;
</content>
</entry>
<entry>
<title>filter: make exit status local</title>
<updated>2014-01-10T16:45:43Z</updated>
<author>
<name>Jason A. Donenfeld</name>
<email>Jason@zx2c4.com</email>
</author>
<published>2014-01-10T02:51:02Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/cgit/commit/?id=b67ea0c0222d5b7eb4f65413047138e72055d8c5'/>
<id>urn:sha1:b67ea0c0222d5b7eb4f65413047138e72055d8c5</id>
<content type='text'>
It's only used in one place, and not useful to have around since
close_filter will die() if exit_status isn't what it expects, anyway. So
this is best as just a local variable instead of as part of the struct.

Signed-off-by: Jason A. Donenfeld &lt;Jason@zx2c4.com&gt;
</content>
</entry>
</feed>
