Commits


portable: release 0.109


avoid use of an undefined variable in test_tag_created and test_tag_changed


bump version number


CHANGES for 0.109


gotwebd: preserve 'folder=' parameter when following More links When navigating commits made to a file in a subdirectory the More link wouldn't work as it looked for the file path in the repository root directory rather than the subdirectory.


fix diffstat path order bug in field width computation The order in which get_diffstat() receives paths may not be the same as the lexicographic order of the changed paths path list, so do not use RB_MAX() to get the path that will be used in the current max path len check. Use the path entry returned by the current got_pathlist_insert() call instead. In such cases that get_diffstat() does not receive paths in lexicographic order, this can produce a bogus diffstat max_path_len if the last lexicographically sorted path entry doesn't have the longest pathname of all changed paths in the diff, which manifests as misaligned diffstat path separators as reported by stsp on IRC. ok stsp@


regress/cmdline: diffstat test for long, nested paths Although ostensibly a test to ensure long paths are properly aligned, the bug prompting this was due to computing the max path length of an already checked path due to an incorrect RB_MAX() call (fix in the next commit): get_diffstat() may not receive paths in lexicographic order, in which case the bad RB_MAX() call returns a path that has already been length checked, which is not the most recently added path. So we would sometimes end up with a max_path_len that was not actually the longest path, which manifested in misaligned path separators in the diffstat and was reported by stsp on IRC. ok stsp@


fix a bogus "received unexpected privsep message" error from gotsh Ensure that gotsh receives its end of the pack file data pipe before repo_read starts sending pack file creation progress messages. Messages of type GOTD_IMSG_PACKFILE_PROGRESS would end up being received in gotsh's recv_done() function, where such messages are not expected.


avoid needless use of STAILQ_FOREACH_SAFE, we are not removing elements here


avoid the needless check for set membership in got-read-pack as well The list of ids traversed here won't contain IDs already present in the set.


avoid a needless check for set membership in got_pack_repaint_parent_commits() The list of ids traversed here won't contain IDs already present in the set.


reduce indentation in got_pack_repaint_parent_commits(); no functional change


reduce indentation in repaint_parent_commits(); no functional change


in repaint_parent_commits(), handle some errors properly


need to hop to the done: label upon error in a nested loop


remove unused parameter 'nqueued' from pin_pack_for_commit_painting()


fix number of queued ids passed from findtwixt() to got_pack_paint_commits()


remote unused parameter 'nids' from got_pack_find_pack_for_commit_painting()


handle missing parent commits while coloring commits in got-read-pack When a parent is not present in the pack file, handle this situation gracefully rather than erroring out. Fixes a regression introduced with recent got-read-pack coloring changes where commands such as 'got send' could fail with 'got-read-pack: object not found'.


fix a double-free introduced with changes to got-read-pack coloring


whitespace and unwrap a line; no functional changes


rework got-read-pack's commit coloring loop Port the parent commit coloring fix to got-read-pack, and ensure that it starts off with the same state as the main process. got-read-pack did not have access to the main process's ids array, and was thus working with a different initial state. With these changes the same commit traversal happens regardless of whether coloring is "offloaded" to got-read-pack or not (verified manually by placing debug printfs). ok jamsek


fix pack exclusion via an ancestor commit When a commit is first discovered as a commit which should be included in the pack, but is later found to be a parent of a commit which should be excluded from the pack, gotadmin pack correctly excluded the commit itself but failed to exclude this commit's parents. This bug is the reason why our test suite did not notice that gotd was not protecting references when clients did not send a pack file. In our test case, these parents are in the 'keep' set already and were never added to the 'skip' set. A useless pack was built which included those parents and nothing else. Add a test which triggers the bug via gotadmin pack. ok jamsek


style(9) only; no functional changes Reflow lines exceeding 80 columns; replace Allman with K&R braces; and line continuation whitespace. ok stsp@


fix gotd failing to protect references when the client sends an empty pack Found by martijn@ ok jamsek