<feed xmlns='http://www.w3.org/2005/Atom'>
<title>cgit/ui-snapshot.c, branch lf/filter</title>
<subtitle>A hyperfast web frontend for git repositories written in C.</subtitle>
<id>http://git.cetero.st/cgit/atom/ui-snapshot.c?h=lf%2Ffilter</id>
<link rel='self' href='http://git.cetero.st/cgit/atom/ui-snapshot.c?h=lf%2Ffilter'/>
<link rel='alternate' type='text/html' href='http://git.cetero.st/cgit/'/>
<updated>2014-01-14T01:00:07Z</updated>
<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>
<entry>
<title>ui-snapshot: set unused cgit_filter fields to zero</title>
<updated>2014-01-12T19:16:33Z</updated>
<author>
<name>John Keeping</name>
<email>john@keeping.me.uk</email>
</author>
<published>2014-01-12T17:13:49Z</published>
<link rel='alternate' type='text/html' href='http://git.cetero.st/cgit/commit/?id=da218fcd9eb554a8405ca72e84bcc0feb371194f'/>
<id>urn:sha1:da218fcd9eb554a8405ca72e84bcc0feb371194f</id>
<content type='text'>
By switching the assignment of fields in the cgit_filter structure to
use designated initializers, the compiler will initialize all other
fields to their default value.  This will be needed when we add the
extra_args field in the next patch.

Signed-off-by: John Keeping &lt;john@keeping.me.uk&gt;
</content>
</entry>
<entry>
<title>ui-snapshot.c: Do not reinvent suffixcmp()</title>
<updated>2014-01-10T16:04:43Z</updated>
<author>
<name>Lukas Fleischer</name>
<email>cgit@cryptocrack.de</email>
</author>
<published>2014-01-10T11:44:38Z</published>
<link rel='alternate' type='text/html' href='http://git.cetero.st/cgit/commit/?id=e711679618ce704633f09bc10d2fe85291054536'/>
<id>urn:sha1:e711679618ce704633f09bc10d2fe85291054536</id>
<content type='text'>
Use suffixcmp() from Git instead of reimplementing it. This is a
preparation for moving to ends_with() in Git 1.8.6.

Signed-off-by: Lukas Fleischer &lt;cgit@cryptocrack.de&gt;
</content>
</entry>
<entry>
<title>Update copyright information</title>
<updated>2014-01-08T14:10:49Z</updated>
<author>
<name>Lukas Fleischer</name>
<email>cgit@crytocrack.de</email>
</author>
<published>2014-01-08T14:10:49Z</published>
<link rel='alternate' type='text/html' href='http://git.cetero.st/cgit/commit/?id=f7f26f88755ac6a3b9af4918b51b0d6e7a692c78'/>
<id>urn:sha1:f7f26f88755ac6a3b9af4918b51b0d6e7a692c78</id>
<content type='text'>
* Name "cgit Development Team" as copyright holder to avoid listing
  every single developer.

* Update copyright ranges.

Signed-off-by: Lukas Fleischer &lt;cgit@crytocrack.de&gt;
</content>
</entry>
<entry>
<title>cgit.c: Do not reset HOME after unsetting it.</title>
<updated>2013-05-25T18:33:28Z</updated>
<author>
<name>Jason A. Donenfeld</name>
<email>Jason@zx2c4.com</email>
</author>
<published>2013-05-25T17:25:56Z</published>
<link rel='alternate' type='text/html' href='http://git.cetero.st/cgit/commit/?id=03eb76dfad2887127581f5f1b4e2edbe8c4ca5fe'/>
<id>urn:sha1:03eb76dfad2887127581f5f1b4e2edbe8c4ca5fe</id>
<content type='text'>
The number of odd cases in which git will try to read config is far too
great to keep putting a bandaid over each one, so we'll just unset it.

If it turns out that scripts really liked to know about $HOME, we can
always reset it in the filter forks.

Signed-off-by: Jason A. Donenfeld &lt;Jason@zx2c4.com&gt;
</content>
</entry>
<entry>
<title>ui-snapshot: do not access $HOME</title>
<updated>2013-04-30T10:29:07Z</updated>
<author>
<name>Jason A. Donenfeld</name>
<email>Jason@zx2c4.com</email>
</author>
<published>2013-04-30T10:27:41Z</published>
<link rel='alternate' type='text/html' href='http://git.cetero.st/cgit/commit/?id=8bf4a0465e81da877e0c81620ae4ac9356145fc9'/>
<id>urn:sha1:8bf4a0465e81da877e0c81620ae4ac9356145fc9</id>
<content type='text'>
It's a bit tedious to have to do this here too. If we encounter other
issues with $HOME down the line, I'll look into adding some nice utility
functions to handle this, or perhaps giving up on the hope that we could
keep $HOME defined for scripts.

This commit additionally adds a test case, should the issue surface
again.

Signed-off-by: Jason A. Donenfeld &lt;Jason@zx2c4.com&gt;
</content>
</entry>
<entry>
<title>ui-snapshot.c: Prepend "V" when guessing ref names</title>
<updated>2013-04-10T12:49:31Z</updated>
<author>
<name>Lukas Fleischer</name>
<email>cgit@cryptocrack.de</email>
</author>
<published>2013-04-10T11:04:03Z</published>
<link rel='alternate' type='text/html' href='http://git.cetero.st/cgit/commit/?id=8c4c2c464b664228d4819af6ec1f8438af3c7c89'/>
<id>urn:sha1:8c4c2c464b664228d4819af6ec1f8438af3c7c89</id>
<content type='text'>
In cgit_print_snapshot_links() we strip leading "v" and "V", while we
currently only prepend a lower case "v" when parsing a snapshot file
name. This results in broken snapshot links for tags that start with an
upper case "V". Avoid this by prepending a "V" as a fallback.

Signed-off-by: Lukas Fleischer &lt;cgit@cryptocrack.de&gt;
</content>
</entry>
<entry>
<title>use struct strbuf instead of static buffers</title>
<updated>2013-04-08T14:12:52Z</updated>
<author>
<name>John Keeping</name>
<email>john@keeping.me.uk</email>
</author>
<published>2013-04-06T09:28:57Z</published>
<link rel='alternate' type='text/html' href='http://git.cetero.st/cgit/commit/?id=fb3655df3bf85bd405c5921bbd4b3a54c705c839'/>
<id>urn:sha1:fb3655df3bf85bd405c5921bbd4b3a54c705c839</id>
<content type='text'>
Use "struct strbuf" from Git to remove the limit on file path length.

Notes on scan-tree:
This is slightly involved since I decided to pass the strbuf into
add_repo() and modify if whenever a new file name is required, which
should avoid any extra allocations within that function.  The pattern
there is to append the filename, use it and then reset the buffer to its
original length (retaining a trailing '/').

Notes on ui-snapshot:
Since write_archive modifies the argv array passed to it we
copy the argv_array values into a new array of char* and then free the
original argv_array structure and the new array without worrying about
what the values now look like.

Signed-off-by: John Keeping &lt;john@keeping.me.uk&gt;
</content>
</entry>
<entry>
<title>Convert cgit_print_error to a variadic function</title>
<updated>2013-04-08T14:11:29Z</updated>
<author>
<name>John Keeping</name>
<email>john@keeping.me.uk</email>
</author>
<published>2013-04-06T10:23:52Z</published>
<link rel='alternate' type='text/html' href='http://git.cetero.st/cgit/commit/?id=ed5bd30ebe6921dd22948a3f33a314283f043606'/>
<id>urn:sha1:ed5bd30ebe6921dd22948a3f33a314283f043606</id>
<content type='text'>
This removes many uses of "fmt" which uses a fixed size static pool of
fixed size buffers.  Instead of relying on these, we now pass around
argument lists for as long as possible before using a strbuf to render
content of an arbitrary size.

Signed-off-by: John Keeping &lt;john@keeping.me.uk&gt;
</content>
</entry>
<entry>
<title>Always #include corresponding .h in .c files</title>
<updated>2013-04-08T13:45:34Z</updated>
<author>
<name>John Keeping</name>
<email>john@keeping.me.uk</email>
</author>
<published>2013-04-06T10:37:59Z</published>
<link rel='alternate' type='text/html' href='http://git.cetero.st/cgit/commit/?id=8f208794318f83826e98168b8b430f2d9a68bcce'/>
<id>urn:sha1:8f208794318f83826e98168b8b430f2d9a68bcce</id>
<content type='text'>
While doing this, remove declarations from header files where the
corresponding definition is declared "static" in order to avoid build
errors.

Also re-order existing headers in ui-*.c so that the file-specific
header always comes immediately after "cgit.h", helping with future
consistency.

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