Commits


remove now pointless 'check_disk' parameter of got_repo_map_path() suggested by naddy


make tog avoid got_repo_map_path() if a work tree is available ok naddy


Call pthread_cond_destroy(cond) exactly once when closing a view. This moves the pthread_cond_destroy(need_commits) from stop_log_thread(), which can be called twice, to close_log_view(), which is called once. It also destroys the commit_loaded condition variable, which is created in open_log_view() but was never destroyed. ok stsp


highlight matched search terms in tog diff and tog blame views ok naddy@


show current/total line numbers in tog's diff view header


plug two memory leaks in tog's draw_file()


merge new diff implementation from the git.gameoftrees.org diff.git repository This new diff implementation was started by Neels Hofmeyr during the u2k20 hackathon and now replaces diffreg.c code lifted from the OpenBSD base system. The integration of this code into Got was done by me. Got now uses the patience diff algorithm by default. The diff.git repository will remain the primary repository for the diff code, which already compiles and runs on other operating systems such as Linux. Any fixes and improvements for files inherited from the diff.git repository should be written against that repository and synced to got.git afterwards.


indentation fixes


use got_path_dirname() in tog's input_log_view(); avoids const dirname(3) ok naddy


do not treat the -h and -V flags as errors When run with the -h or -V option, output the help or version text to stdout and exit with success (0). Only write usage and help information to stderr and exit with error (1) if there is a mistake in the command syntax. tweak and ok stsp


prefer the BSD extension to reset getopt over the GNU one Sadly there is no portable way to reset getopt(3). BSD: optind = 1; optreset = 1; GNU: optind = 0; ok stsp


make dangling symbolic references show up in 'got ref -l' Storing a resolved ID for each reference list item was a bad idea. This ID cannot be resolved if a symbolic references points to a reference which does not exist. Such symrefs were skipped by got ref -l as a result. Just let users of reference lists resolve the IDs as needed.


Print newline to clear the bottom line when tog exits. When a curses(3)-based application exits, the cursor is positioned at the start of the bottom line, and the shell will issue the new prompt there. However, the bottom line may still contain remnants of the curses screen. This is only noticeable on terminals that do not switch to/from an alternate screen buffer. ok stsp


speed up 'tog diff' get_filestream_info() a bit With this, 'tog diff' is able to display clang 10 commits. However, such huge diffs still take a rather long time to open. get_filestream_info() is a hack. Ideally, diff line-offset information needed by tog should be part of the result of the diff operation, rather than forcing tog to calculate line offsets during a post-processing step.


simplify resource cleanup upon errors in get_filestream_info()