Commit Briefs

Omar Polo

gotwebd: drop superfluous check

commit_id is not NULL if got_repo_match_object_id returned successfully. ok stsp@


Omar Polo

gotwebd: kill unused id_str in got_output_repo_tree

ok stsp@


Omar Polo

gotwebd: avoid extra strdups in got_output_repo_tree

ok stsp@


Omar Polo

gotwebd: avoid extra variable in got_output_repo_tree

in_repo_path was used only to build a path, it's then assigned to path (which is NULL at that point.) Just asprintf into path. ok stsp@


Omar Polo

gotwebd: plugs leaks in got_get_repo_commits

call got_get_repo_commit only once and avoid leaking the field of repo_commit at each loop iteration. ok stsp@



Omar Polo

gotwebd: always free ref in got_get_repo_commits

some code-paths may leak it. ok stsp@


Omar Polo

gotwebd: don't close tag in got_get_repo_tags too early

it's still used a bit later, so defer the free'ing at the next loop iteration or at function end.


Omar Polo

gotwebd: free commit_msg0 only at the end of got_get_repo_tags

in case of a failure between when it's allocated and when it's released it might get leaked otherwise. ok and semplification stsp@


Omar Polo

gotwebd: plug some leaks in got_get_repo_tags

ok stsp@


Omar Polo

gotwebd: free all allocated fields of repo_tag

got_get_repo_tags needs some tweaking to how tag_commit is allocated too. ok stsp@


Omar Polo

gotwebd: fix possible leaks when handling errors

all very unlikely. part of a bigger diff that's ok stsp@


Omar Polo

gotwebd: minor tweaks

drop: - a tautological s[strlen(s)] == '\0' - a few duplicates checks - a lone if (error) when it's always NULL - an extra NULL check part of a bigger diff that's ok stsp@





Omar Polo

gotwebd: fix memory leak introduced in d927f8c

ok tracey@


Omar Polo

gotwebd: make sure to escape possibly unsafe strings

this fixes only the HTML escaping of strings, the urlencode is still missig. while here also plug a memory leak in gotweb_render_branches and drop some needless ternary operators. ok tracey@


Omar Polo

gotwebd: add fcgi_printf

instead of fcgi_gen_response which outputs only a fixed strings provide a printf-like fcgi_printf: it greatly simplifies the generation of the HTML pages. While here also (probably) fix some HTML errors: the output was verified with the W3C validator and it's correct (in the sense that the tags are properly closed, there are still some other things the validator complains about.) ok/encouragement baseprime@, ok jamsek Thanks for reading such a boring diff!


Omar Polo

fix overflow in blame callback

spotted by noticing gotwebd crashing on some blame requests. Diff from stsp@ with a fix from tracey@, I'm committing it only because he is short on time. ok stsp@


Omar Polo

gotwebd: fix alternate colors in tree entries

it was broken in 7ecc454 because now we're emitting tags with multiple `class' attributes (by mistake) and only the first one is used. However, instead of fixing the HTML `class' attribute, use a CSS selector to alternate the background colors. ok tracey@


Omar Polo

gotwebd: switch some HTML IDs to classes

HTML IDs are meant to be unique across the page. While here fix two small errors in the generated HTML (one missing closing div and one extra.) ok tracey@


Omar Polo

gotwebd: simplify got_output_file_blob loop

there's no need to distinguish between plain text blob and a binary one in the output, just send it chunk by chunk. ok tracey@


Omar Polo

gotwebd: simplify isbinary


Omar Polo

gotwebd: fix double Content-Type (and the typo)

ok tracey@