Commits
- Commit:
5d860bcebedf3a8db88af8374918aca891bbb222
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
gotwebd: templateify gotweb_render_diff
To avoid calling functions from got_operations.c directly from a
template (which would hide the error), change got_output_repo_diff into
got_open_diff_for_output that returns a file with the diff in it, to be
then rendered by the template. got_gotweb_flushfile needs to be exposed
then.
It also bundles a smaller change: the `label' argument of
got_repo_match_object_id is optional and not used, so just pass NULL
there.
- Commit:
e1a9403aede3667c1bda6cbc15817b5484b70a9c
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
gotwebd: urlencode also the double quote character
URLs are embedded as part of the HTML and, while it seems legal from
RFC3986 to leave that character unquoted, we need it quoted to avoid
breaking the HTML output.
ok tracey@
- Commit:
3c14c1f2875343bc03f7ef656f03bfa85ba1b4bf
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
gotwebd: templateify gotweb_render_tree
ok tracey@
- Commit:
b82440e1f439a679e7f7cb962a7f042e2d2019f1
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
gotwebd: render BLOB inline, add BLOBRAW for serving raw blobs
binary blobs are automatically redirected to the BLOBRAW page (which is
the old BLOB.)
ok jamske
- Commit:
0cef9478411f528bc7f37b8c7a21d21a7f650592
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
change gotweb_render_content_type argument type to const char *
it's a string, `const char *' is fine (and what all the callers use
anyway.)
- Commit:
d7034a4ea257e654c3ac01eae64452461d31d233
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
gotwebd: use Content-Disposition for RSS; sets the filename
Since gotwebd serves the RSS from a path without a file name component,
browsers just make up a random string to give the file a name which can
be confusing. Furthermore, since it's served as application/rss+xml
they try to render the XML (failing.)
Use gotweb_render_content_type_file (which sets the Content-Disposition
HTTP header) to fix both: the feed is now called <repo-name>.rss and set
as attachment (thus saved and not rendered.) Change the function to
take an optional filename suffix for the occasion.
ok jamsek
- Commit:
c7c382950394eeda4875e2da6812e05c61a291d3
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
gotwebd: tweak gotweb_render_content_type_file parameters type
`type' and `file' are strings so use `const char *' for both.
- Commit:
00475f9a1ab9244b6e22272ead0a2591ded61b68
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
gotwebd: drop redundant NULL check
qs is guaranteed to be not NULL reached that point.
- Commit:
ee7c14200a271dc3c8ce07e7d2f5102820f67422
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
gotwebd: remove useless comment
should be placed further down, after BLOB and RSS are handled, but the
call to `gotweb_render_header' is successfully clear on its own.
- Commit:
cb11302ca643bbb042a84f1e4784202c0f9a1252
- From:
- Thomas Adam <thomas@xteddy.org>
- Date:
portable: gotwebd: use template
This updates -portable's gotwebd instance to make use of the new
templating engine.
- Commit:
d6795e9fa6cc029fe5e47ccc827abe3a498a7e71
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
gotwebd: add an RSS feed for the tags
ok tracey@
- Commit:
7ade8b27a9039824713dfc36189c6bc9470bbe0c
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
gotwebd: templateify gotweb_render_commits
ok tracey@
- Commit:
2f4f0731243b48a022f336d0ce7765a27e0cc56e
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
gotwebd: templateify gotweb_render_navs
ok tracey@
- Commit:
3d6d1fb0b8a423e777c05cd69b1fb57fd69dd94c
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
gotwebd: drop index_page_str and page_str
gotwebd uses sprintf to update index_page_str and page_str if they were
negative. While this specific usage is safe, let's drop it. Since the
index_page_str and page_str fields are never read from, remove them.
This saves two allocations per request too.
ok tracey@
- Commit:
8ea2e76efa46b2e518a3e42ed90787d73dff3f96
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
gotwebd: fix broken navigation in commits page since 8d02314
ok tracey@
- Commit:
e7e5fa49fc2e589a02ba9a9412a7b8e2377ead68
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
gotwebd: start using the template system
ok tracey@
- Commit:
43a44bcef13e7014c764133b35560035d246baaf
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
gotwebd: simplify bit of gotweb_process_request
ok tracey
- Commit:
3e9a56b5bba8e25189ba076c2c3d6fd0b56a6446
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
gotwebd: provide maximum value for the description and cloneurl
ok stsp@
- Commit:
53f9cbbf15eda94db076b865ad565e51da757669
- From:
- Thomas Adam <thomas@xteddy.org>
- Date:
portable: sha1.h
- Commit:
4606e6d4d9f8bbd3f9e4ac08a08f06f8793467d7
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
gotwebd: rework gotweb_get_repo_{description,cloneurl}
- use openat(2) since we've already opened the containing dir
- use fstat(2) instead of multiple seeks
- don't special case len == 0
ok and improvements by stsp
- Commit:
6c7f10f7250c7b1cb44cc9490bec065ad0107d24
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
gotwebd: drop unused path parameter from got_get_repo_{owner,age}
ok jamsek
- Commit:
24240f6a1c027ee762d62f20165a6b8d5ed88980
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
gotwebd: simplify gotweb_render_index
- drops the double loop; paginate in one go
- avoid lstat + got_path_dir_is_empty for each entry: use dt_type if
provided by the underlying filesystem
- fixes a memleak: before `continue' we need to call
gotweb_free_repo_dir
ok stsp
- Commit:
57e88d7cd338f2bca9e5bcb9184ddda2ab435197
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
gotwebd: use prev_disp to decide when to we've reached max_repos
instead of hardcoding d_i - 2 and so expecting only "." and ".." as
skipped entries, use t->prev_disp that is the number of repositories
traversed until now (both skipped due to the pagination and the ones
actually rendered.)
ok jamsek
- Commit:
2dd71cdd72c0c6c4ce607fdc73ae38fa898bfeb2
- From:
- Omar Polo <op@omarpolo.com>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
gotwebd: fix memleak in error path
ok stsp@
- Commit:
3991b2a5fc4bf9e028e24e4ea4f7f66f1ed4ff6c
- From:
- Landry Breuil <landry@openbsd.org>
- Via:
- Thomas Adam <thomas@xteddy.org>
- Date:
add respect_exportok flag, defaulting to off
allows to hide repositories if they have the magic git-daemon-export-ok file
ok op@ tracey@ stsp@