Commits
- Commit:
e4caa658300a7add4b5ea31badafdbec0dc733f7
- From:
- Omar Polo <op@omarpolo.com>
- Date:
gotwebd: centralize the skip tag logic
No need to do it twice, just make sure the tailq has the correct
entries where it's generated, so in the render code we don't have
to duplicate the logic.
ok stsp@
- Commit:
9e111e2e198b3193e6ba6ee05233427812784f76
- From:
- Omar Polo <op@omarpolo.com>
- Date:
gotwebd: add support for an "owner" file
Was requested in the IRC channel some time ago. The "owner" file is
also supported by stagit.
tweaks stsp and tracey, ok stsp
- Commit:
cbae186176b82efbf747a1486addb8b52c664651
- From:
- Omar Polo <op@omarpolo.com>
- Date:
gotwebd: avoid unnecessary strdup()
It's fine to leave the owner set to NULL in case there is none. The
template {{..}} construct accepts NULLs (rendering an empty string),
and repo_dir->owner is only passed to that or to free().
- Commit:
a0c23862a7804dbba0e030bd78bf05ed4d1ffdfe
- From:
- Omar Polo <op@omarpolo.com>
- Date:
gotwebd: plug fd leak in error path
- Commit:
fae3f56c90a8e133ab63a37fb266354f88fe4911
- From:
- Omar Polo <op@omarpolo.com>
- Date:
swap error check in got_gotweb_closefile() to always call ftruncate
- Commit:
1220d7ea84811c79f71a7f24917d77cb2f10b02a
- From:
- Omar Polo <op@omarpolo.com>
- Date:
got{,web}d: unify log.c
gotd and gotwebd are using almost the same log.c file, so unify.
This only slightly changes gotwebd logs to include the process name,
like gotd.
ok stsp@
- Commit:
283939fb8245f1600227fa1cde3c5623666fac8d
- From:
- Lucas Gabriel Vuotto <lucas@sexy.is>
- Via:
- Omar Polo <op@omarpolo.com>
- Date:
replace date, strftime %G-%m-%d with %F
Use the more predictable %F, aka %Y-%m-%d, instead of %G-%m-%d. %G
follows the definition of ISO-8601 week-based year, which is weird.
In particular, 2024 is one of such years with weird behaviour:
$ date -jf %Y-%m-%d +"%F %G-%m-%d" 2024-12-30
2024-12-30 2025-12-30
Diff from Lucas Gabriel Vuotto (thanks!); stsp agrees
- Commit:
98297eed5b9082b66f6397a0921c8d90df72cca1
- From:
- Stefan Sperling <stsp@stsp.name>
- Date:
rename got_commit_graph_iter_start() to got_commit_graph_bfsort()
This function begins a breadth-first traversal. The new name makes
it easier to distinguish from got_commit_graph_toposort().
- Commit:
26b163a03e920e099a9aeefaeb6e99d0e0a8baf9
- From:
- Omar Polo <op@omarpolo.com>
- Date:
gotwebd: guard against missig folder and file parameter in BLOB and BLAME
ok stsp
- Commit:
723721e290eec4393f8cad56a6bb38ca9fd379c7
- From:
- Omar Polo <op@omarpolo.com>
- Date:
gotwebd: use 'more' for the tag listing too
prodded by stsp and jamsek; ok stsp@
- Commit:
ac15152e219bed9c7f41007a39c3cbce83ea9386
- From:
- Omar Polo <op@omarpolo.com>
- Date:
gotwebd: render READMEs in the tree view
ok tracey@
- Commit:
7f65bb55b8cfe0f964fd7cb845acfbc28621730e
- From:
- Omar Polo <op@omarpolo.com>
- Date:
gotwebd: add patch action to serve diffs in plain text
ok tracey@
- Commit:
26678adde25a1fb7fa3e4b78c82a888cc3b767e4
- From:
- Omar Polo <op@omarpolo.com>
- Date:
gotwebd: get rid of proc.[ch]
proc.c really shines when there's a network of different types of
processes, potentially with a various number of instances each,
that needs to exchange messages. Gotwebd instead has a much simpler
design, and using proc.c causes more overhead (/headaches) than it
solves.
So, this attempts to provide the same functionalities but with a
much simpler implementation that fits gotwebd better.
ok stsp@
- Commit:
417c89236426dd72eb3d8127de7747d4ac134f67
- From:
- Omar Polo <op@omarpolo.com>
- Date:
gotwebd: fix branches modification time with show_repo_age off
If show_repo_age is set to off, got_get_repo_age() returns without
setting the timestamp. got_get_repo_age() is also used by the
branch listing to show how old they are however, and we end up
rendering the stack garbage.
Instead, respect `show_repo_age off' one layer above, and always
return a timestamp in got_get_repo_age(). While here, initialize
the timestamp to zero so it's set also in case of failures.
Issue reported on IRC by xs, thanks!
- Commit:
4448825ab554378228429f5ac53c9cf943cc2503
- From:
- Omar Polo <op@omarpolo.com>
- Date:
dropping unnecessary strlen()s
ok jamsek, stsp
- Commit:
23c35dae297d2eecd13e17118a547761314a578d
- From:
- Omar Polo <op@omarpolo.com>
- Date:
change got_get_repo_tags' limit argument to size_t
The function already carefully avoids wrapping around zero. While
here add a sanity check for limit == 0, like what was previously done
for got_get_repo_commits().
- Commit:
0a2fc48663670b6fb1a778aafc653227c9103442
- From:
- Omar Polo <op@omarpolo.com>
- Date:
gotwebd: make got_get_repo_commits take a size_t
and while here make sure 0 is rejected.
requested by, improvements and ok stsp@
- Commit:
5144d22b0c3bcf6611cc36e93a3a859fcc521277
- From:
- Omar Polo <op@omarpolo.com>
- Date:
gotwebd: simplify got_get_repo_commits(): don't traverse all the commits!
In some cases (e.g. limit=1 for DIFF action) we could end up traversing
all the commits instead of fetching just the one requested. Needless to
say, this makes the diff page extremely slow.
reported by and ok stsp@
- Commit:
50f6148a8cb54672795a89ce089488e86f584a0e
- From:
- Omar Polo <op@omarpolo.com>
- Date:
gotwebd: fix some got_error_from_errno2/3 calls
it's not printf-like so %s don't make sense. Tweak the order of
the arguments to obtain the intended output.
- Commit:
f06465966b88928c2801b7d9ecb36c3a7c5e36b4
- From:
- Omar Polo <op@omarpolo.com>
- Date:
gotwebd: avoid needless double fseek()
got_gotweb_closefile() already takes care of rewinding before
truncating and closing, so no need to replicate here.
ok stsp@
- Commit:
8a078d7f1359fdf37e7bc18d6ace3c3579b98b33
- From:
- Omar Polo <op@omarpolo.com>
- Date:
gotwebd: lower log priority of unexpected disconnections
no need to be so loud when a client disconnects earlier than expected,
log it only in verbose mode. Don't log GOT_ERR_CANCELLED too since
that is only used to communicate the callers that we need to stop.
ok stsp@
- Commit:
29efeeddc18828c36f1a6df50e05297a51a1a396
- From:
- Omar Polo <op@omarpolo.com>
- Date:
oops, one was missing
- Commit:
4e3e8516c9205eb93e0203a60fd74e271f567adb
- From:
- Omar Polo <op@omarpolo.com>
- Date:
got_operations.c: use consistently a space before labels
makes diff prettier and easier to read; instead of the label we
have the function name in the hunk line.
- Commit:
d20cd3851233c5fcfd89337f428bf85b45f1f6d7
- From:
- Omar Polo <op@omarpolo.com>
- Date:
remove fsync() from got_gotweb_closefile()
discussed with millert@
- Commit:
24a4d8019b7b2937f03fc86f47048f599ec6617c
- From:
- Omar Polo <op@omarpolo.com>
- Date:
rename got_gotweb_flushfile -> got_gotweb_closefile
suggested and ok millert@