Commit Briefs
exit the loop in got_privsep_recv_tree() upon error
found while looking over tracey's scan-build results
plug a memory leak in got_privsep_recv_tree() in error case
found while looking over tracey's scan-build results
add -s option to 'got remove' which deletes files in a particular status
This makes it easy to deal with files that were deleted from disk by external tooling which modified the work tree. Such files are left in missing (!) status and can now be marked for deletion in bulk via 'got rm -s\! -R .' For consistency, modified (M) files can now be removed with 'got rm -s M' which implies 'got rm -f'. Prompted by feedback from krw@
add -s option to 'got status' which acts as a status code filter
Advantages over using grep are that the list of codes is validated against a list of known status codes, and that it is easier to match staged files which can display status codes in one or both of two columns. Prompted by feedback from krw@
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.
fix double-free when quitting tog's diff view; found by ofree
at /home/stsp/src/got/tog/tog.c:3415 3415 free(s->line_offsets); (gdb) bt msg=0x80e2a4cd87e "chunk is already free %p") at /usr/src/lib/libc/stdlib/malloc.c:300 check=1) at /usr/src/lib/libc/stdlib/malloc.c:1070 clear=0, check=<optimized out>, argsz=0) at /usr/src/lib/libc/stdlib/malloc.c:1431 at /usr/src/lib/libc/stdlib/malloc.c:1488 at /home/stsp/src/got/tog/tog.c:3415 at /home/stsp/src/got/tog/tog.c:518 at /home/stsp/src/got/tog/tog.c:954 at /home/stsp/src/got/tog/tog.c:2728 at /home/stsp/src/got/tog/tog.c:5683 (gdb)
add a -q option to tests for quiet output and use it for 'make regress'
Previous default output remains when test cases are run individually. ok tracey
got parse.y tweaks
Rename things to better match their intended purpose. Tweak namespacing. Add a function for freeing config items that are dynamically allocated. Add 'struct gotconfig' to make room for potential global settings we might want to add later, instead of implementing just a list of remote repositories. ok tracey
make 'got log' -R and -P options work in combination
With -R, the -P option did not show any paths. Regression test added here demonstrates the problem.
Fix missing block grouping.
ok tracey stsp
fix committing file additions from a work tree with a path prefix
New files were added under the wrong tree in the repository if the work tree has a path prefix. Fix this problem and catch it in the existing commit_with_path_prefix regression test.
fix spurious 'got cherrypick' error with a path prefix and an empty tree
If the work tree's path prefix does not exist in the first of the two trees, then 'got cherrypick' failed with "no such entry found in tree". But this is a legitimate situation, as shown in the new test added here. The first tree could be the empty tree, for example, which should result in 'got cherrypick' adding all files from the second tree instead of complaining about a non-existent path-prefix directory in the first tree.
Add a 'got info' command which displays work tree meta-data.
Remove the alias 'got in' for 'got init'. The 'in' alias was too close to either 'init' or 'info'. ok tracey, millert