<feed xmlns='http://www.w3.org/2005/Atom'>
<title>cgit/ui-tree.c, branch v0.9.2</title>
<subtitle>A hyperfast web frontend for git repositories written in C.</subtitle>
<id>http://git.cetero.st/cgit/atom/ui-tree.c?h=v0.9.2</id>
<link rel='self' href='http://git.cetero.st/cgit/atom/ui-tree.c?h=v0.9.2'/>
<link rel='alternate' type='text/html' href='http://git.cetero.st/cgit/'/>
<updated>2013-04-08T14:12:52Z</updated>
<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>
<entry>
<title>cgit_print_tree(): Free curr_rev after usage</title>
<updated>2013-03-05T01:47:53Z</updated>
<author>
<name>Lukas Fleischer</name>
<email>cgit@cryptocrack.de</email>
</author>
<published>2013-03-04T12:25:36Z</published>
<link rel='alternate' type='text/html' href='http://git.cetero.st/cgit/commit/?id=985d6ca7e70ca4774b81106e9eeecd619e5b3930'/>
<id>urn:sha1:985d6ca7e70ca4774b81106e9eeecd619e5b3930</id>
<content type='text'>
Fixes following memory leak seen with "PATH_INFO=/cgit/tree/":

    ==15715== 7 bytes in 1 blocks are definitely lost in loss record 4 of 51
    ==15715==    at 0x4C2C04B: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
    ==15715==    by 0x56F2DF1: strdup (in /usr/lib/libc-2.17.so)
    ==15715==    by 0x46CAA8: xstrdup (wrapper.c:35)
    ==15715==    by 0x418A4C: cgit_print_tree (ui-tree.c:274)
    ==15715==    by 0x407D91: tree_fn (cmd.c:131)
    ==15715==    by 0x405E16: process_request (cgit.c:574)
    ==15715==    by 0x4074C8: cache_process (cache.c:322)
    ==15715==    by 0x406C4F: main (cgit.c:872)

Signed-off-by: Lukas Fleischer &lt;cgit@cryptocrack.de&gt;
</content>
</entry>
<entry>
<title>ui-tree.c: Use a context structure in walk_tree()</title>
<updated>2013-03-04T14:12:55Z</updated>
<author>
<name>Lukas Fleischer</name>
<email>cgit@cryptocrack.de</email>
</author>
<published>2013-03-03T16:22:30Z</published>
<link rel='alternate' type='text/html' href='http://git.cetero.st/cgit/commit/?id=210a5711ad8135de025b1a058079eead3d680a67'/>
<id>urn:sha1:210a5711ad8135de025b1a058079eead3d680a67</id>
<content type='text'>
Use the context pointer to pass context information instead of misusing
global variables, as we already did in "ui-blob.c" and in "ui-plain.c".

In addition to the fixes to walk_tree(), pass the same structure to
ls_tree() and ls_item() which is read_tree_recursive()-based as well.

Signed-off-by: Lukas Fleischer &lt;cgit@cryptocrack.de&gt;
</content>
</entry>
<entry>
<title>ui-tree.c: Drop the header variable</title>
<updated>2013-03-04T14:12:55Z</updated>
<author>
<name>Lukas Fleischer</name>
<email>cgit@cryptocrack.de</email>
</author>
<published>2013-03-03T15:55:21Z</published>
<link rel='alternate' type='text/html' href='http://git.cetero.st/cgit/commit/?id=bfe576624541febd6005ad6a4633680369a7dc34'/>
<id>urn:sha1:bfe576624541febd6005ad6a4633680369a7dc34</id>
<content type='text'>
Instead, use the value of the state variable to determine whether the
footer needs to be drawn.

Signed-off-by: Lukas Fleischer &lt;cgit@cryptocrack.de&gt;
</content>
</entry>
<entry>
<title>ui-tree.c: Declare the state variable globally</title>
<updated>2013-03-04T14:12:55Z</updated>
<author>
<name>Lukas Fleischer</name>
<email>cgit@cryptocrack.de</email>
</author>
<published>2013-03-03T15:49:47Z</published>
<link rel='alternate' type='text/html' href='http://git.cetero.st/cgit/commit/?id=c4b8db3f0973bc63d60806d197b55dc2901870f0'/>
<id>urn:sha1:c4b8db3f0973bc63d60806d197b55dc2901870f0</id>
<content type='text'>
This allows for removing the header variable in a following patch. We
can use the state variable to check whether the tail needs to be printed
instead.

Note that the state variable will be moved into a context structure
later.

Signed-off-by: Lukas Fleischer &lt;cgit@cryptocrack.de&gt;
</content>
</entry>
<entry>
<title>ui-tree.c: Pass current revision to print_object()</title>
<updated>2013-03-04T14:12:55Z</updated>
<author>
<name>Lukas Fleischer</name>
<email>cgit@cryptocrack.de</email>
</author>
<published>2013-03-03T15:45:14Z</published>
<link rel='alternate' type='text/html' href='http://git.cetero.st/cgit/commit/?id=fb5a37317de9532509b9c398916c0290212ae233'/>
<id>urn:sha1:fb5a37317de9532509b9c398916c0290212ae233</id>
<content type='text'>
No longer access the global curr_rev variable in print_object().

This will make it easier to squash the curr_rev variable into a context
structure without having to pass the context to the print_object()
function.

Signed-off-by: Lukas Fleischer &lt;cgit@cryptocrack.de&gt;
</content>
</entry>
<entry>
<title>White space around control verbs.</title>
<updated>2013-03-04T14:12:54Z</updated>
<author>
<name>Jason A. Donenfeld</name>
<email>Jason@zx2c4.com</email>
</author>
<published>2013-03-04T04:21:33Z</published>
<link rel='alternate' type='text/html' href='http://git.cetero.st/cgit/commit/?id=bdae1d8a8d39206ac75ab86f8e9ef53b2f29432e'/>
<id>urn:sha1:bdae1d8a8d39206ac75ab86f8e9ef53b2f29432e</id>
<content type='text'>
Signed-off-by: Jason A. Donenfeld &lt;Jason@zx2c4.com&gt;
</content>
</entry>
<entry>
<title>Fix several whitespace errors</title>
<updated>2013-03-04T00:12:48Z</updated>
<author>
<name>Lukas Fleischer</name>
<email>cgit@cryptocrack.de</email>
</author>
<published>2013-03-03T15:04:29Z</published>
<link rel='alternate' type='text/html' href='http://git.cetero.st/cgit/commit/?id=53bc747d311d18642fa3ad0cc0de34f3899ed1f4'/>
<id>urn:sha1:53bc747d311d18642fa3ad0cc0de34f3899ed1f4</id>
<content type='text'>
* Remove whitespace at the end of lines.
* Replace space indentation by tabs.
* Add whitespace before/after several operators ("+", "-", "*", ...)
* Add whitespace to assignments ("foo = bar;").
* Fix whitespace in parameter lists ("foobar(foo, bar, 42)").

Signed-off-by: Lukas Fleischer &lt;cgit@cryptocrack.de&gt;
</content>
</entry>
</feed>
