Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Simplifying | data-man | 2022-01-24 | 1 | -6/+1 |
| | |||||
* | Using Oniguruma library (optionally) | data-man | 2022-01-24 | 1 | -1/+6 |
| | |||||
* | eval: Check that RLIM_SAVED_{CUR,MAX} are defined before using them | Tavian Barnes | 2021-12-05 | 1 | -3/+24 |
| | | | | | Apparently they're missing on Debian kfreebsd: https://buildd.debian.org/status/fetch.php?pkg=bfs&arch=kfreebsd-amd64&ver=2.3-1&stamp=1638379495&raw=0 | ||||
* | printf: Take a CFILE, not a FILE | Tavian Barnes | 2021-10-09 | 1 | -1/+1 |
| | |||||
* | eval: Remove an extra space from -ls output | Tavian Barnes | 2021-09-02 | 1 | -1/+1 |
| | |||||
* | eval: Use 512-byte blocks for -ls when POSIXLY_CORRECT is set | Tavian Barnes | 2021-09-02 | 1 | -1/+2 |
| | | | | | This matches the behaviour of GNU find, and allows bfs to match the output of BSD find as well. Fixes #77. | ||||
* | util: Rename fallthrough to BFS_FALLTHROUGH | Tavian Barnes | 2021-06-09 | 1 | -2/+2 |
| | | | | This avoids shadowing the actually standard name fallthrough. | ||||
* | Implement time units for -{a,B,c,m}time | Tavian Barnes | 2021-06-02 | 1 | -3/+5 |
| | | | | From FreeBSD find. Closes #75. | ||||
* | eval: Raise RLIMIT_NOFILE if possible | Tavian Barnes | 2021-05-20 | 1 | -11/+37 |
| | | | | | | This lets us keep more open FDs cached in bftw(). The limit is lowered before running -exec commands, in case they're incompatible with a high limit (e.g. due to select()). | ||||
* | Use `<< {10,20,...}` instead of `*1024*1024...` | Tavian Barnes | 2021-05-20 | 1 | -5/+5 |
| | |||||
* | Implement -flags, from FreeBSD find | Tavian Barnes | 2021-03-06 | 1 | -0/+34 |
| | | | | This is the last BSD-specific primary I'm aware of. Fixes #14. | ||||
* | eval: Set the exit status automatically in eval_error() | Tavian Barnes | 2021-03-06 | 1 | -5/+3 |
| | |||||
* | Update copyright dates | Tavian Barnes | 2021-02-05 | 1 | -1/+1 |
| | |||||
* | dir: New DIR* facade | Tavian Barnes | 2021-01-28 | 1 | -58/+50 |
| | |||||
* | Enable -Wshadow by default | Tavian Barnes | 2021-01-28 | 1 | -10/+10 |
| | | | | And fix the one case it warns on. | ||||
* | -used: Make the implementation match the GNU fixes for findutils 4.8.0 | Tavian Barnes | 2021-01-13 | 1 | -2/+7 |
| | |||||
* | eval: Make -hidden behave consistently | Tavian Barnes | 2020-11-28 | 1 | -1/+8 |
| | | | | | | | | | | | | | | | 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. | ||||
* | Include what I use | Tavian Barnes | 2020-11-12 | 1 | -0/+2 |
| | | | | Thanks to https://github.com/include-what-you-use/include-what-you-use | ||||
* | Use two newlines for all pre-eval warnings | Tavian Barnes | 2020-11-09 | 1 | -1/+1 |
| | |||||
* | eval: Fix the status bar to only print the parent again | Tavian Barnes | 2020-11-04 | 1 | -5/+7 |
| | |||||
* | eval: Make a crude attempt to handle double-width chars in the status bar | Tavian Barnes | 2020-11-04 | 1 | -11/+49 |
| | |||||
* | Enable -Wsign-compare to catch bugs like 726d7801 | Tavian Barnes | 2020-11-04 | 1 | -5/+5 |
| | |||||
* | New -status option to display a status bar | Tavian Barnes | 2020-11-03 | 1 | -11/+100 |
| | |||||
* | expr, eval: Clean up header dependencies | Tavian Barnes | 2020-10-06 | 1 | -0/+1 |
| | |||||
* | diag: New bfs_perror() function | Tavian Barnes | 2020-10-05 | 1 | -6/+6 |
| | |||||
* | util: Don't rely on bftw | Tavian Barnes | 2020-09-30 | 1 | -1/+1 |
| | | | | And rename format_mode() to xstrmode() while I'm at it. | ||||
* | Rename struct cmdline to bfs_ctx | Tavian Barnes | 2020-09-27 | 1 | -66/+80 |
| | | | | | The API remains similar, with some added accessor functions for lazy initialization of the pwcache and mtab. | ||||
* | stat: Rename bfs_stat_flag to _flags | Tavian Barnes | 2020-09-18 | 1 | -2/+2 |
| | | | | Flags enums should be plural. | ||||
* | Don't call stat() just to determine symbolic lengths | Tavian Barnes | 2020-09-18 | 1 | -5/+3 |
| | | | | | | | The new bftw_cached_stat() helper gets us stat info if we already have it, but doesn't call stat() if we don't. In that case we just take a guess for the initial length to readlinkat(). This lets us avoid stat() entirely in many cases for -lname and -printf %l. | ||||
* | Implement -xattrname | Tavian Barnes | 2020-08-13 | 1 | -0/+13 |
| | | | | From macOS find. | ||||
* | bftw: Make some flag names more explicit | Tavian Barnes | 2020-07-29 | 1 | -6/+6 |
| | |||||
* | bftw: Rename bftw_typeflag to bftw_type, and make it not a bitmask | Tavian Barnes | 2020-07-29 | 1 | -37/+35 |
| | |||||
* | eval: Fix an assertion failure with -D search -s | Tavian Barnes | 2020-06-16 | 1 | -0/+1 |
| | |||||
* | eval: Fix a segfault with -D search -S eds | Tavian Barnes | 2020-06-16 | 1 | -0/+1 |
| | |||||
* | Treat -nohidden like -exclude -hidden | Tavian Barnes | 2020-06-07 | 1 | -12/+0 |
| | | | | Fixes #30. | ||||
* | Implement -exclude, a special form for convenient exclusions | Tavian Barnes | 2020-06-07 | 1 | -0/+5 |
| | | | | Fixes #8. | ||||
* | diag: Unify debug printing | Tavian Barnes | 2020-06-02 | 1 | -14/+14 |
| | |||||
* | pwcache: Rename from passwd.[ch] | Tavian Barnes | 2020-04-22 | 1 | -1/+1 |
| | |||||
* | passwd: Cache the user/group tables | Tavian Barnes | 2020-02-29 | 1 | -22/+7 |
| | | | | | | | | | | | | | | | | | | | | | | This is a significant optimization for conditions that need these tables: Benchmark #1: ./bfs ~/code/linux -nouser >/dev/null Time (mean ± σ): 232.0 ms ± 2.5 ms [User: 44.3 ms, System: 185.0 ms] Range (min … max): 228.7 ms … 238.7 ms 12 runs Benchmark #2: ./bfs-1.6 ~/code/linux -nouser >/dev/null Time (mean ± σ): 1.050 s ± 0.012 s [User: 544.2 ms, System: 500.0 ms] Range (min … max): 1.025 s … 1.063 s 10 runs Benchmark #3: find ~/code/linux -nouser >/dev/null Time (mean ± σ): 1.040 s ± 0.012 s [User: 533.6 ms, System: 500.6 ms] Range (min … max): 1.017 s … 1.054 s 10 runs Summary './bfs ~/code/linux -nouser >/dev/null' ran 4.48 ± 0.07 times faster than 'find ~/code/linux -nouser >/dev/null' 4.52 ± 0.07 times faster than './bfs-1.6 ~/code/linux -nouser >/dev/null' | ||||
* | eval: Irregular files aren't empty | Tavian Barnes | 2020-02-14 | 1 | -1/+1 |
| | | | | | GNU find's -empty returns false for devices, sockets, etc., even though their st_size is 0. Match that behaviour. | ||||
* | time: Split out time-related functions from util | Tavian Barnes | 2020-02-13 | 1 | -0/+1 |
| | |||||
* | Update copyright dates | Tavian Barnes | 2020-01-07 | 1 | -1/+1 |
| | |||||
* | eval: For -ls, print a + if a file has ACLs | Tavian Barnes | 2020-01-07 | 1 | -1/+2 |
| | |||||
* | darray: New dynamic array library | Tavian Barnes | 2019-08-29 | 1 | -1/+2 |
| | |||||
* | Make -mount and -xdev do different things | Tavian Barnes | 2019-07-04 | 1 | -0/+1 |
| | | | | | | | | | POSIX now says -mount should skip the whole mount point, while -xdev should only skip its descendents. C.f. http://austingroupbugs.net/view.php?id=1133 C.f. https://savannah.gnu.org/bugs/?42318 C.f. https://savannah.gnu.org/bugs/?54745 | ||||
* | bftw: Remove BFTW_SKIP_SIBLINGS | Tavian Barnes | 2019-06-25 | 1 | -7/+6 |
| | | | | | It's not used by bfs, and it's difficult to support in all search strategies. | ||||
* | util: Filter out . and .. in xreaddir() | Tavian Barnes | 2019-06-25 | 1 | -25/+8 |
| | |||||
* | eval: Get rid of a level of indirection for quit | Tavian Barnes | 2019-06-16 | 1 | -13/+10 |
| | |||||
* | Implement an iterative deepening mode (-ids) | Tavian Barnes | 2019-05-29 | 1 | -1/+2 |
| | |||||
* | Implement a depth-first mode (-dfs) | Tavian Barnes | 2019-05-28 | 1 | -1/+14 |
| |