Commits
- Commit:
2aea6fc2c2c95ba4968b598247e00edb6f91048b
- From:
- Omar Polo <op@omarpolo.com>
- Date:
gotwebd: delete always-true check
ok stsp@
- Commit:
65c2e81071bab7f9018a062b4d590e67e1a6f021
- From:
- Omar Polo <op@omarpolo.com>
- Date:
gotwebd: avoid full history traversal in briefs/commits
This purposefully breaks the 'previous' button in the commits and briefs
page. It's hard to find the parent of a commit since they can only be
iterated forward. The way the previous button was generated was to walk
the history from the HEAD down to the specified commit. This is costly
but more importantly leads to issue when dealing with paths that were
deleted from the repository.
Discussed with stsp and tracey, ok jamsek.
- Commit:
aa31714b5b44e1b79b15792902586d60da22e47a
- From:
- Omar Polo <op@omarpolo.com>
- Date:
gotwebd: don't got_ref_list per-commit in got_get_repo_commits
It's wasteful since `refs' is already populated before the loop, and
released after. It also leaks the content of `refs' the first time the
loop is entered.
ok jamsek
- Commit:
cb93ab40659f5d64c7a4f56919d203efa2d8a565
- From:
- Omar Polo <op@omarpolo.com>
- Date:
gotwebd: turn gotweb_get_time_str into gotweb_render_age
ok jamsek
- Commit:
1f3405c91dec0b4eb48df5156751b5ef6add3f37
- From:
- Mark Jamsek <mark@jamsek.dev>
- Date:
refactor got log -d and tog diffstat to compute diff once
This eliminates the previous performance cost by making 'got log -d' and tog
diff view compute the diffstat while building the diff in a temp file like we
do with 'got diff -d'. Also, keep the current 'got log -d' UI as per stsp's
suggestion.
ok stsp@
- Commit:
760079985fc2d63ebd4155a76d4f0d20fbc2f4c5
- From:
- Omar Polo <op@omarpolo.com>
- Date:
gotwebd: inline got_output_file_blob into gotweb_process_request
ok jamsek
- Commit:
8319855fa7affdb1199a46d76f87b9fec409eb81
- From:
- Omar Polo <op@omarpolo.com>
- Date:
gotwebd: templateify gotweb_render_blame
ok and tweak from jamsek
- Commit:
587550a5041e8aba39cd1338a22e85b6405d879f
- From:
- Omar Polo <op@omarpolo.com>
- Date:
gotwebd: templateify gotweb_render_diff
ok tracey@; rebased after recent changes.
- Commit:
a76e88e58fb716d5dded83442b153b60687283cb
- From:
- Mark Jamsek <mark@jamsek.dev>
- Date:
got: expand diffstat -d option to 'got diff'
Like got log -d, add the switch to 'got diff' to display a diffstat of changes;
as per stsp's suggestion, we always include diff output with the diffstat.
Disabled in gotwebd (for now :) Includes tweaks from op@
ok stsp@
- Commit:
17c726049a0c49099ef0a44190264fa4b6b037fa
- From:
- Omar Polo <op@omarpolo.com>
- Date:
backout 169b163113a6db9878c9166aa05fbd30d05eb832
pushed by mistake, wasn't reviewed.
- Commit:
169b163113a6db9878c9166aa05fbd30d05eb832
- From:
- Omar Polo <op@omarpolo.com>
- 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:
43d421de222216d318387afcd42a4941d2714d95
- From:
- Omar Polo <op@omarpolo.com>
- Date:
gotwebd: templateify gotweb_render_tree
ok tracey@
- Commit:
298f95fb39537cc43237be56aeb86ffbc21e38f0
- From:
- Omar Polo <op@omarpolo.com>
- 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:
0b287d3f8df90ae3e97d9c35ac16299fd63e0c3e
- From:
- Omar Polo <op@omarpolo.com>
- Date:
gotwebd: rework got_output_file_blob, no functional change
can now use got_object_blob_is_binary to simplify the logic.
ok stsp@
- Commit:
92c8ec640028151d1e92eaef79c4fcd1365998bc
- From:
- Omar Polo <op@omarpolo.com>
- 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:
1abb18e1777172a9f4149a0f50c4cecfd024f02c
- From:
- Omar Polo <op@omarpolo.com>
- Date:
gotwebd: add an RSS feed for the tags
ok tracey@
- Commit:
c127fc49cfbf532409724a0e4644f4b2539e430f
- From:
- Omar Polo <op@omarpolo.com>
- Date:
gotwebd: drop unused path parameter from got_get_repo_{owner,age}
ok jamsek
- Commit:
d9787ed86ecec0bda7a570181d86c44ba80bd583
- From:
- Omar Polo <op@omarpolo.com>
- Date:
make got_commit_graph_iter_next use caller-provided storage for the id
and adjust the callers. discussed with and ok stsp@
- Commit:
4f0a80ed18c14d32968b403c50ce3e88e917da8f
- From:
- Omar Polo <op@omarpolo.com>
- Date:
gotwebd: fix briefs navigation broken in 4a9629420
got_get_repo_commits iterates over the commits and build a queue for
later display. My previous memleak fix moved the TAILQ_INSERT_TAIL
*before* the logic to exit the loop and so it broke the pagination.
This fixes it by delaying the insertion into the queue, but also by
moving the check for the "previous" button after we've opened the
commit.
ok tracey
- Commit:
8d02314fcaebb323c9ca3b102f8a085d66ea4633
- From:
- Omar Polo <op@omarpolo.com>
- Date:
gotwebd: percent-encode generated URLs
This adds a new helper function `gotweb_link' that outputs an HTML link
with the parameter correctly escaped.
ok stsp@
- Commit:
58354f546a10c9449ba427873d047ef113c1693e
- From:
- Omar Polo <op@omarpolo.com>
- Date:
gotwebd: plug leak in got_output_repo_tree
- Commit:
6227cf0ee49b322cc297ef95bdad09ea8eae2ec4
- From:
- Omar Polo <op@omarpolo.com>
- Date:
gotwebd: fix usage of the commit graph iter
got_get_repo_commits mixes ids allocated on the heap and the one
returned by the iter_next in the same variable, and then even attemp to
free it.
This is both a leak (we loose the pointer to the previously allocated
id) and a possible invalid free since the object id pointer returned by
the graph iterator is not to be passed to free(3).
part of a bigger diff that's ok stsp@
- Commit:
b94206d0acc1c55bad1233c35f959fa7c4af297b
- From:
- Omar Polo <op@omarpolo.com>
- Date:
gotwebd: free obj_id and reflist in got_output_file_blame
ok stsp@
- Commit:
a33a44db81f52e0217b4e38e2e180442521f37ad
- From:
- Omar Polo <op@omarpolo.com>
- Date:
gotwebd: got_output_file_blame: free lines on error path
ok stsp@
- Commit:
8a4f92ca904ede1f7a5e7e1bafdf8be7974943ed
- From:
- Omar Polo <op@omarpolo.com>
- Date:
gotwebd: free eline in got_gotweb_blame_cb loop
ok stsp@