Commits


replace "(cd path && git cmd)" with "git -C path cmd" This matches the existing use of "got -r path cmd" and "git_commit path args".


rename test to better reflect what it is checking for


add regression test for 'got rm *' $PWD removal Patch by Mikhail


make 'got revert' and 'got rm' work on non-existent directories problem found by robert@ ok jamsek, op


use test(1) -eq and -ne to compare integers, and reduce quoting This brings the rest of the regression test scripts in line with patch.sh.


make 'got rm' report an "unexpected status" error for unversioned files ok millert@


make 'got rm' behave like rm(1) for paths found missing on disk ok millert@


sort and de-duplicate work tree path command line arguments This is important in cases like 'got diff file.txt file.txt' which should only show the diff for file.txt once. suggested by kn@


accommodate ls -l implementations that print "total 0" in an empty directory ok stsp


switch function declarations from Korn shell to Bourne/POSIX shell syntax ok stsp


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 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


expand test cases in test_rm_symlink


make 'got rm' work on symlinks; test case written by tracey


fix test sandbox name of test_rm_directory_keep_files


trim directories in got remove -R This is a racy solution that needs to be properly implemented in the future. ok stsp


add -k option to 'got remove' to keep files on disk ok stsp


add -R option to 'got remove' for recursive deletion ok stsp


fix 'mv foo bar; got rm foo; got add bar' and put paths in error messages


use get_worktree_paths_from_argv consistently; improves add/rm edge cases Double 'got rm' becomes a no-op like double 'got add' already is, and 'got add' of an already staged file is now an error.


allow removing multiple paths at once for 'got rm'


use cmp -s, instead of cmp, in all command line tests


got_error_set_errno: take a char arg to pass to got_error_prefix_errno $> got rm a got: : No such file or directory becomes $> got rm a got: /path/to/a: No such file or directory


fix behaviour when 'got rm' is used twice


add a basic implementation of 'got rm'