Commit Briefs

33083b2ece Mark Jamsek

tog: don't make users wait for the worktree diff to quit (main)

Reported by naddy: if the user opens tog and quickly quits before the log thread has finished fetching work tree state for displaying dirty work tree entries, the main thread waits for the log thread to finish before acting on the user's quit input. This produces a noticeable lag between entering 'q' and tog actually terminating. Pass a pointer to the quit flag to the worktree diff cancel callback so we can act on it immediately without making the user wait. tested by naddy who confirmed it greatly reduces the lag


93d213ec35 Stefan Sperling

do not delete objects reached via nested tags during 'gotadmin cleanup'

Make gotadmin cleanup resolve multiple levels of nested tags, in order to ensure that objects referenced via nested tags will not get deleted. Add test coverage for this edge case.


bf60f5a292 Stefan Sperling

do not delete directly referenced trees and blobs during 'gotadmin cleanup'

We only considered referenced commit and tag objects during cleanup. Directly referenced trees or blobs were seen as unreferenced, and deleted during cleanup. Add test coverage for this problem and fix it.


219faa2992 Stefan Sperling

update gotadmin cleanup documentation to mention repacking


518bbd3ad2 Stefan Sperling

remove a todo item that's done (gotadmin cleanup)


72fd8fc46d Mark Jamsek

plug memleak and ensure fd is valid before passing to close(2)

While here, fix potential NULL deref in gotadmin cleanup and pack error paths. ok stsp@


d855ad4fcc Stefan Sperling

make gotadmin cleanup pack the repository before cleaning

Our cleanup implementation is only safe to use after everything referenced has been packed into a single pack file. Otherwise, the algorithm we use for checking pack redundancy might remove small packs which contain objects that other objects depend on. The easy fix for this issue is to have 'gotadmin cleanup' create the required pack file before cleaning up, making cleanup safe by default. This happens to be what 'git gc' does as well. ok jamsek


85db999061 Stefan Sperling

switch to fseeko() and tweak error checking in file_is_binary()

provided by mark during review of previous change


c1142a3476 Stefan Sperling

remove full content comparison loop from got status

We are going to run modified files through the diff engine anyway. As a bonus speed-up tweak, skip conflict marker detection in binary files found on disk.


cdc6696506 Stefan Sperling

skip full content comparison in 'got status' if file sizes differ

Speeds up 'got status' in work trees that contain large files which are modified. This change exposes bugs in 'got revert' which now manifest as test failures. One bug where the size recorded in the file index is not updated during revert, and another where a wrong base commit is recorded in the file index entry during revert. Fix those bugs, too. ok jamsek


455ae1c8c7 Stefan Sperling

rename gotwebd "socket" processes to "server"

This name is more inuitive and matches the documentation of the prefork parameter in gotwebd.conf. ok jamsek


7f57b003a9 Stefan Sperling

drop read access to /var/www from gotwebd's parent process

ok jamsek


f26d624479 Stefan Sperling

make gotwebd's parent process drop root privileges

Once the configuration has been applied the parent process does nothing which would require root privileges. ok jamsek


34b2702155 Stefan Sperling

add ssh -i identity-file support to commands which use the network

Add a -i option to got clone, fetch, send, as well as cvg clone, update, commit. This allows ad-hoc use of SSH private keys without having to create entries in ~/.ssh/config. The test suite for an upcoming gotsysd(8) daemon needs this to log into temporary test VMs with temporary SSH keys, both generated by the test suite. ok jamsek


ade7d17b61 Stefan Sperling

add -J option to usage() function of relevant commands


3333ce96c5 Stefan Sperling

make 'cvg commit' actually apply the -J option



d3901b506e Stefan Sperling

try to improve http-server startup/teardown in regress

Let tests fail if http-server fails to start up within 5 seconds. Make http-server report its process ID in its log file such that tests can kill it by PID. Prompted by semi-regular failures on my arm64 regress builder.


aca784d0f6 Mark Jamsek

use got_object_id_queue_free() instead of hand-rolled code

ok stsp@


79917dd618 Mark Jamsek

tog: don't apply count modifier to the H, &, p keymaps

It's annoying to have the help (H) and limit (&) keymaps repeatedly fire after closing their respective views if accidentally preceded by a count modifier, and doesn't seem like a valid use case. Similarly, writing N patch files to /tmp is wasteful. ok stsp@


ebdd042fb1 Stefan Sperling

check for errors from telldir(3); suggested by jamsek


c0586da31b Stefan Sperling

make 'got import' output independent of readdir(3) entry order

ok jamsek


0bae7db616 Stefan Sperling

add a TODO item for 'gotadmin cleanup'


54859d1a7e Stefan Sperling

make seq(1) invocations in test_log_commit_keywords() portable

The OpenBSD version of seq defaults to an increment value of -1 here. On Debian we have to set the increment value to -1 explicitly. Otherwise, seq produces no output at all and the test fails.