Commit Briefs
CHANGES for 0.110 (tags/0.110)
change gotwebd diff algorithm from myers-diff to patience-diff
This matches the default of our command line diff and tog diff. If anyone really prefers myers we could add an option gotwebd.conf.
fix endless loop regression in got-read-pack's commit coloring implementation
reported by jrick@ with a reproducible test case, thanks!
CHANGES for 0.109 (tags/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 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.
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'.