Commit Briefs

47f028303c Thomas Adam

avoid traversing enumerated commits more than once in got-read-pack

Keep track of parent commits that will be processed as part of looping over the commit queue provided by the main process, and do not add these commits to the queue again. Fixes pointless traversal of commits on the queue which will simply be skipped. The end result is the same either way. ok tracey


4088ab23bf Thomas Adam

fix missing commits in pack files created with packed object enumeration

got-read-pack forgot to send a tree-enumeration-done message to the main process if the tree of a given commit had already been traversed. The main process would then not add the corresponding commit to the pack file, even though it should be added. Found while using 'got send' towards gotd in order to populate an empty repository on the server with non-trivial history, where some commits always ended up missing due to this bug. ok tracey


d4becbee8b Thomas Adam

cmd_tag: avoid unnecessary strdup of signer_id

ok jrick


717bfe1fc5 Thomas Adam

portable: set next version


0c3124f53a Thomas Adam

portable: release 0.82 (tags/0.82)


3c075bf727 Thomas Adam

gotwebd.8: fix Xr typo http.conf -> httpd.conf


370cf40033 Thomas Adam

got merge: call the right usage_*() function

Diff from Mikhail, thanks!


33da44fec3 Thomas Adam

bump version number


b4dee23518 Thomas Adam

CHANGES for 0.82



1f1613cf29 Thomas Adam

make gotd store own PID after daemon(3), and avoid calling daemon(3) needlessly

ok op, jamsek


70f07862e9 Thomas Adam

got: don't leak pathlist in commit and revert commands

ok stsp@


6ec3d39ca0 Thomas Adam

don't print empty line when exiting tog

Reported and tested by dv: rather than print a new line to avoid clobbering the shell prompt when exiting tog with the alternate screen buffer disabled^, adopt naddy's vi(1) solution by looping through visible views to delete the topmost line, which inserts an empty line at the bottom so we don't need to print an empty line to ensure a clean prompt. ^: xterm -xrm 'XTerm*titeInhibit: 1' or run tog in the console ok naddy@


f2d06bef0f Thomas Adam

tog: display action report on user toggleable event

If the diff algorithm, ignore whitespace-only changes, force ASCII text diff, show committer/author, or reference sort order keymaps are toggled, report action to the bottom left of screen. Based on initial patch by Mikhail. ok + tweaks op@


b185e03310 Thomas Adam

tog: fix typo that makes condition always false

In view_loop(), we initialise at a refresh rate of one tenth per second before dropping to one second updates; the reduction was never hit due to the typo. Reviewed as part of the following diff adding action reports to user events. ok op@


6e58d3c940 Thomas Adam

gotsh: move apply_unveil right after the first pledge

and while here drop the second pledge() call since unveil is already locked by apply_unveil. ok stsp


c8fcdde846 Thomas Adam

gotsh: avoid a temporary buffer for the socket path

ok stsp


a72fb3943a Thomas Adam

add a test for ssh connections without a repo path argument

would have caught the fixed failure in disposing early-closed connections in gotd. ok jamsek, stsp


214d733a8e Thomas Adam

gotsh: validate with parse_command before connecting

Export parse_command (now got_serve_parse_command) from lib/serve.c and use it to validate the command line in gotsh instead of just checking that the -c argument starts with 'git-receive-pack' or 'git-upload-pack'. Invalid usage now always fails before opening the socket, while before it wasn't always the case. This also means that invalid usage doesn't count towards the limits. ok jamsek, stsp


f5f71a0483 Thomas Adam

gotd: disconnect on client EOF too

Otherwise gotd keeps the (client-closed) sockets around and may prevent new connections from being established since they still count for the limits. ok jamsek, stsp


8efb3dc0bc Thomas Adam

fmt; fold long line


42814e0176 Thomas Adam

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.


b4d10c2be9 Thomas Adam

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


53bf32b82a Thomas Adam

gotwebd: turn gotweb_get_time_str into gotweb_render_age

ok jamsek


502374853d Thomas Adam

gotwebd: refactor gotweb_render_content_type/_file

Rework them so that they allow to set the Status header (the HTTP status code; only way since we're behind FastCGI) and optionally a Location. Since they're now unused outside of gotweb.c, mark them as static. They also used to always return NULL so the error is pointless; return the -1 on failure though. While here, rename to gotweb_reply and gotweb_reply_file. ok jamsek