Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Revert "tests: Add a test for posix-basic alternation" | Tavian Barnes | 2022-01-29 | 1 | -5/+0 |
| | | | | | | | Turns out alternation is not actually part of the POSIX basic regular expression language, it's just a glibc extension. This reverts commit c898af13a671ee92a056467d324f16823594eb1c. | ||||
* | tests: Add a test for posix-basic alternation | Tavian Barnes | 2022-01-29 | 1 | -0/+5 |
| | |||||
* | ci/macos: Switch back to macos-latest | Tavian Barnes | 2021-12-19 | 1 | -22/+29 |
| | |||||
* | tests: Set TZ to a real timezone | Tavian Barnes | 2021-12-10 | 1 | -1/+1 |
| | | | | | | | POSIX states that the offset is not optional in the TZ environment variable. Link: https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap08.html | ||||
* | parse: Switch back to O_TRUNC from explicit ftruncate() | Tavian Barnes | 2021-10-19 | 1 | -15/+9 |
| | | | | | | | | O_TRUNC is not equivalent to an unconditional ftruncate(), e.g. for device files. This reverts the behaviour change from 78944c81, which was never released and is not supported in other find implementations. | ||||
* | tests: Distinguish between failures and crashes | Tavian Barnes | 2021-10-19 | 1 | -47/+61 |
| | |||||
* | tests: Set abort_on_error=1 for the sanitizers | Tavian Barnes | 2021-10-19 | 1 | -0/+6 |
| | | | | This makes it easier to distinguish crashes from expected failures | ||||
* | printf: Colorize file names/paths in simple cases | Tavian Barnes | 2021-10-09 | 1 | -0/+5 |
| | |||||
* | tests: Add a test for an operator in an unexpected position | Tavian Barnes | 2021-10-01 | 1 | -0/+5 |
| | |||||
* | tests: Add tests for parsing invalid integers | Tavian Barnes | 2021-10-01 | 1 | -0/+21 |
| | | | | And give some better error messages. | ||||
* | tests: Add a tests for missing and nonexistent paths | Tavian Barnes | 2021-10-01 | 1 | -0/+20 |
| | |||||
* | Don't truncate files until we know they're not duplicates | Tavian Barnes | 2021-09-26 | 1 | -0/+29 |
| | |||||
* | ctx: Also deduplicate the standard streams | Tavian Barnes | 2021-09-21 | 1 | -5/+50 |
| | | | | | | This fixes some potential missing output when the same file is used in a redirection and something like -fprint. The main benefit is smarter handling of /dev/stdout, which will now share the CFILE* with cout. | ||||
* | tests: Make the -files0-from tests weirder | Tavian Barnes | 2021-09-15 | 1 | -3/+5 |
| | |||||
* | Implement -files0-from FILE | Tavian Barnes | 2021-09-15 | 1 | -0/+37 |
| | | | | | See https://savannah.gnu.org/bugs/?60383 for the development of the corresponding GNU find feature. | ||||
* | Use /usr/bin/env bash as the shebang in scripts | Tavian Barnes | 2021-08-05 | 1 | -1/+1 |
| | | | | This should reduce the need for patches on the BSDs. | ||||
* | Implement time units for -{a,B,c,m}time | Tavian Barnes | 2021-06-02 | 1 | -0/+6 |
| | | | | From FreeBSD find. Closes #75. | ||||
* | tests: Don't use -perm /MODE in POSIX tests | Tavian Barnes | 2021-05-20 | 1 | -2/+2 |
| | |||||
* | tests: Optimize test_delete_many() | Tavian Barnes | 2021-04-18 | 1 | -1/+2 |
| | |||||
* | tests: Don't fail -flags test if we can't set flags | Tavian Barnes | 2021-04-18 | 1 | -4/+2 |
| | |||||
* | tests: Don't fail xattr tests if we can't set xattrs at all | Tavian Barnes | 2021-04-18 | 1 | -29/+17 |
| | |||||
* | tests: Add a test for deleting large directories | Tavian Barnes | 2021-04-18 | 1 | -0/+12 |
| | | | | This serves as a test for https://github.com/tavianator/bfs/issues/67 | ||||
* | test: Add more tests for -H/-L and -type l | Tavian Barnes | 2021-03-28 | 1 | -1/+17 |
| | |||||
* | tests: Actually remove capabilities after dropping them | Tavian Barnes | 2021-03-23 | 1 | -5/+8 |
| | |||||
* | tests: Avoid looping forever when failing to drop capabilities | Tavian Barnes | 2021-03-22 | 1 | -1/+9 |
| | | | | Link: https://github.com/void-linux/void-packages/pull/29437/checks?check_run_id=2169825021 | ||||
* | tests: Drop capabilities when run as root on Linux | Tavian Barnes | 2021-03-21 | 1 | -6/+29 |
| | | | | | | | | | | | | | bfs's tests rely on file permissions being enforced, which leads them to work incorrectly when run as root. This is probably the most common packaging issue for bfs, most recently seen with Void Linux's update to bfs 2.2. Make it easier on packagers by using capsh, if it's available, to drop the DAC privileges for the tests. Link: https://github.com/void-linux/void-packages/pull/29437#issuecomment-798670288 Link: https://salsa.debian.org/lamby/pkg-bfs/-/commit/b173efb35da126adb39b0984219d6a2fd9ff428f | ||||
* | Implement -flags, from FreeBSD find | Tavian Barnes | 2021-03-06 | 1 | -0/+15 |
| | | | | This is the last BSD-specific primary I'm aware of. Fixes #14. | ||||
* | Update copyright dates | Tavian Barnes | 2021-02-05 | 1 | -1/+1 |
| | |||||
* | tests: -sparse is BSD, not GNU | Tavian Barnes | 2021-01-13 | 1 | -1/+3 |
| | |||||
* | -perm: Use +t instead of ug+t | Tavian Barnes | 2021-01-13 | 1 | -1/+1 |
| | | | | | | | | | The chmod spec says that ug+t is unspecified, and only +t or a+t is guaranteed to actually set the sticky bit. In practice GNU tools respect o+t as well, but ignore u+t/g+t. Fix the implementation to match GNU, and only test the POSIX required parse. | ||||
* | eval: Make -hidden behave consistently | Tavian Barnes | 2020-11-28 | 1 | -0/+6 |
| | | | | | | | | | | | | | | | Previously there was an unexpected difference between $ bfs .hidden -hidden and $ bfs ./.hidden -hidden ./.hidden The intent of the code was to avoid considering `.`, the default starting point, as hidden and thus pruning a whole search with -nohidden. Fix it to do that explicitly, and handle `..` too. | ||||
* | tests: Don't squelch stderr with --verbose | Tavian Barnes | 2020-11-11 | 1 | -48/+64 |
| | |||||
* | tests: Test LS_COLORS extension lowercasing | Tavian Barnes | 2020-11-10 | 1 | -2/+2 |
| | |||||
* | tests: Improve test coverage a bit | Tavian Barnes | 2020-11-10 | 1 | -0/+193 |
| | |||||
* | opt: Predicates aren't true when they're false | Tavian Barnes | 2020-11-09 | 1 | -0/+12 |
| | | | | | | | | | | | | This unfortunate typo was mostly harmless; since the predicates were always assumed to be true, they wouldn't conflict. The exception is -user/-group, which set -nouser/-nogroup to false for users/groups that exist. Even -O0 wasn't enough to suppress the bug, due to a missing optlevel check fixed in the previous commit. Fixes: 305ee902874b49351f4916e303c293523f11570b | ||||
* | printf: Format the empty string for %l of non-links | Tavian Barnes | 2020-09-20 | 1 | -0/+5 |
| | | | | It makes a difference if the format specifier has a width. | ||||
* | Implement -xattrname | Tavian Barnes | 2020-08-13 | 1 | -20/+57 |
| | | | | From macOS find. | ||||
* | parse: Prohibit actions inside -exclude | Tavian Barnes | 2020-06-07 | 1 | -0/+5 |
| | |||||
* | Treat -nohidden like -exclude -hidden | Tavian Barnes | 2020-06-07 | 1 | -0/+5 |
| | | | | Fixes #30. | ||||
* | Implement -exclude, a special form for convenient exclusions | Tavian Barnes | 2020-06-07 | 1 | -0/+18 |
| | | | | Fixes #8. | ||||
* | opt: Make sure facts_when_impure sees *all* impure literals | Tavian Barnes | 2020-06-07 | 1 | -1/+7 |
| | |||||
* | opt: Track data flow information about predicates | Tavian Barnes | 2020-05-22 | 1 | -12/+28 |
| | | | | | | | | | | This allows us to optimize things like -sparse -o -not -sparse <==> -true and -sparse -a -not -sparse <==> -false | ||||
* | Implement -s flag from FreeBSD find to sort results | Tavian Barnes | 2020-03-21 | 1 | -0/+40 |
| | |||||
* | parse: Prettify some of the option-specific help | Tavian Barnes | 2020-03-20 | 1 | -1/+6 |
| | |||||
* | tests: Add a test for -printf %u/%g with a low ulimit | Tavian Barnes | 2020-03-01 | 1 | -0/+7 |
| | |||||
* | eval: Irregular files aren't empty | Tavian Barnes | 2020-02-14 | 1 | -1/+5 |
| | | | | | GNU find's -empty returns false for devices, sockets, etc., even though their st_size is 0. Match that behaviour. | ||||
* | parse: Handle 1969-12-31T23:59:59Z | Tavian Barnes | 2020-02-13 | 1 | -0/+6 |
| | | | | | mktime() returns -1 on error, but also for one second before the epoch. Compare the input against localtime(-1) to distinguish those cases. | ||||
* | Implement -{a,B,c,m,}since | Tavian Barnes | 2020-02-12 | 1 | -0/+13 |
| | |||||
* | Implement explicit reference times (-newerXt) | Tavian Barnes | 2020-02-11 | 1 | -0/+6 |
| | |||||
* | tests: Make test_xattr a sudo test in exactly the right cases | Tavian Barnes | 2020-01-14 | 1 | -11/+14 |
| | | | | This was broken on GNU Hurd, for example. |