Commit Briefs

49c543a6fe Christian Weisgerber

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.


692bdcc498 Stefan Sperling

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

ok millert@


4e12cd97c0 Stefan Sperling

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

ok millert@


10a623dfc2 Stefan Sperling

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@


6b36edd809 Christian Weisgerber

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

ok stsp


f6cae3ed1e Christian Weisgerber

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

ok stsp


766841c297 Stefan Sperling

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@


7fb414ae4d Stefan Sperling

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


64773fdebb Stefan Sperling

expand test cases in test_rm_symlink



9c2e8939ca Stefan Sperling

fix test sandbox name of test_rm_directory_keep_files


15341bfd54 Tracey Emery

trim directories in got remove -R

This is a racy solution that needs to be properly implemented in the future. ok stsp


70e3e7f5a1 Tracey Emery

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

ok stsp


f2a9dc41d8 Tracey Emery

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

ok stsp



6d022e9747 Stefan Sperling

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.


17ed46186c Stefan Sperling

allow removing multiple paths at once for 'got rm'


8d301dd94c Stefan Sperling

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


2af4a04192 joshua stein

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


71a293558d Stefan Sperling

fix behaviour when 'got rm' is used twice


2ec1f75bbb Stefan Sperling

add a basic implementation of 'got rm'