<feed xmlns='http://www.w3.org/2005/Atom'>
<title>cgit/ui-tree.c, branch v0.10</title>
<subtitle>A hyperfast web frontend for git repositories written in C.</subtitle>
<id>https://git.zx2c4.com/cgit/atom/ui-tree.c?h=v0.10</id>
<link rel='self' href='https://git.zx2c4.com/cgit/atom/ui-tree.c?h=v0.10'/>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/cgit/'/>
<updated>2014-01-12T19:20:20Z</updated>
<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>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='https://git.zx2c4.com/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>Reduce line number bloat, fix hover effect</title>
<updated>2014-01-08T13:59:38Z</updated>
<author>
<name>Peter Wu</name>
<email>lekensteyn@gmail.com</email>
</author>
<published>2013-10-03T10:17:23Z</published>
<link rel='alternate' type='text/html' href='https://git.zx2c4.com/cgit/commit/?id=4468ec1b15becf3838d8cf38440c527c487565a4'/>
<id>urn:sha1:4468ec1b15becf3838d8cf38440c527c487565a4</id>
<content type='text'>
Currently line numbers look like (for blob view and sdiff respectively):

    &lt;a class='no' id='n68' name='n68' href='#n68'&gt;68&lt;/a&gt;
    &lt;td class='lineno'&gt;&lt;a class='no' href='...#n1' id='n1' name='n1'&gt;1&lt;/a&gt;&lt;/td&gt;

name=".." is unnecessary if the id attribute is set (this even applies
to IE6), so drop it. (aside, in HTML5, the name attribute is gone.)

The line number links can be selected through their parent classes, no
need for another class "no", so drop it too.

For a file with 2000 lines, this yields a saving of 40% (29% gzipped).

While at it, fix the hover effect of line numbers: now the line number
get a black background as was intended.

Signed-off-by: Peter Wu &lt;lekensteyn@gmail.com&gt;
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='https://git.zx2c4.com/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='https://git.zx2c4.com/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='https://git.zx2c4.com/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='https://git.zx2c4.com/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='https://git.zx2c4.com/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='https://git.zx2c4.com/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='https://git.zx2c4.com/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>
</feed>
