Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Treat -nohidden like -exclude -hidden | Tavian Barnes | 2020-06-07 | 1 | -7/+21 |
| | | | | Fixes #30. | ||||
* | Implement -exclude, a special form for convenient exclusions | Tavian Barnes | 2020-06-07 | 1 | -0/+31 |
| | | | | Fixes #8. | ||||
* | diag: Unify debug printing | Tavian Barnes | 2020-06-02 | 1 | -53/+18 |
| | |||||
* | opt: Track data flow information about predicates | Tavian Barnes | 2020-05-22 | 1 | -2/+2 |
| | | | | | | | | | | This allows us to optimize things like -sparse -o -not -sparse <==> -true and -sparse -a -not -sparse <==> -false | ||||
* | pwcache: Rename from passwd.[ch] | Tavian Barnes | 2020-04-22 | 1 | -1/+1 |
| | |||||
* | parse: Use the right color when suggesting typo fixes | Tavian Barnes | 2020-03-21 | 1 | -113/+126 |
| | |||||
* | parse: Add -X and -s to -D tree output | Tavian Barnes | 2020-03-21 | 1 | -17/+26 |
| | |||||
* | Implement -s flag from FreeBSD find to sort results | Tavian Barnes | 2020-03-21 | 1 | -0/+11 |
| | |||||
* | parse: Fix color code with -D tree -xdev | Tavian Barnes | 2020-03-20 | 1 | -1/+1 |
| | |||||
* | parse: Prettify some errors and warnings | Tavian Barnes | 2020-03-20 | 1 | -51/+57 |
| | |||||
* | parse: Prettify some of the option-specific help | Tavian Barnes | 2020-03-20 | 1 | -41/+32 |
| | |||||
* | parse: Don't warn if POSIXLY_CORRECT is set | Tavian Barnes | 2020-03-15 | 1 | -2/+4 |
| | |||||
* | diag: Make the -warn flag part of the cmdline | Tavian Barnes | 2020-03-15 | 1 | -30/+23 |
| | |||||
* | passwd: Cache the user/group tables | Tavian Barnes | 2020-02-29 | 1 | -6/+44 |
| | | | | | | | | | | | | | | | | | | | | | | 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' | ||||
* | parse: Give -ls and -fls an ephemeral FD for getpwuid()/getgrgid() | Tavian Barnes | 2020-02-29 | 1 | -0/+2 |
| | | | | | | Similar to 9009456c, those functions may open /etc/{passwd,group}, so they need an FD available. Right now, -ls on large trees eventually starts printing numeric IDs instead of usernames/group names. | ||||
* | parse: Don't return success for invalid parse_int() calls with -DNDEBUG | Tavian Barnes | 2020-02-25 | 1 | -2/+2 |
| | |||||
* | time: Split out time-related functions from util | Tavian Barnes | 2020-02-13 | 1 | -145/+14 |
| | |||||
* | parse: Handle 1969-12-31T23:59:59Z | Tavian Barnes | 2020-02-13 | 1 | -13/+14 |
| | | | | | 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 | -20/+52 |
| | |||||
* | parse: Set tm_isdst to -1 | Tavian Barnes | 2020-02-12 | 1 | -1/+3 |
| | | | | | This is required by POSIX to ensure the mktime() determines itself whether DST is in effect. | ||||
* | parse: Work around missing `timezone` on FreeBSD | Tavian Barnes | 2020-02-12 | 1 | -0/+5 |
| | | | | | FreeBSD has a function timezone() that conflicts with the global variable, despite that being specified by POSIX. Use tm_gmtoff instead. | ||||
* | Implement explicit reference times (-newerXt) | Tavian Barnes | 2020-02-11 | 1 | -3/+177 |
| | |||||
* | parse: Add a missing NULL check for trie_insert_mem() | Tavian Barnes | 2020-01-22 | 1 | -0/+5 |
| | |||||
* | Update documentation for the -mount/-xdev revert | Tavian Barnes | 2019-09-14 | 1 | -1/+2 |
| | |||||
* | parse: Don't treat -mount differently from -xdev yet | Tavian Barnes | 2019-09-11 | 1 | -1/+8 |
| | | | | | | | | The new POSIX version with -mount isn't out yet, so there's no point in conforming to a non-existent document while breaking compatibility with GNU find, which hasn't changed yet either. But a warning is added for the future incompatibility. This patch can be reverted to re-enable the feature. | ||||
* | darray: New dynamic array library | Tavian Barnes | 2019-08-29 | 1 | -16/+5 |
| | |||||
* | Make -mount and -xdev documentation alphabetical | Tavian Barnes | 2019-07-05 | 1 | -3/+3 |
| | |||||
* | Make -mount and -xdev do different things | Tavian Barnes | 2019-07-04 | 1 | -13/+38 |
| | | | | | | | | | 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 | ||||
* | parse: Add costs for -*able tests | Tavian Barnes | 2019-06-27 | 1 | -2/+18 |
| | |||||
* | parse: Reorder table_entry to avoid needing to specify prefix=false | Tavian Barnes | 2019-06-25 | 1 | -101/+101 |
| | |||||
* | parse: Sort the parse table | Tavian Barnes | 2019-06-16 | 1 | -6/+6 |
| | |||||
* | parse: Reject unknown search strategies | Tavian Barnes | 2019-06-04 | 1 | -1/+17 |
| | |||||
* | parse: Use -S {bfs,dfs,ids} rather than -{bfs,dfs,ids} | Tavian Barnes | 2019-06-04 | 1 | -14/+29 |
| | |||||
* | Add documentation for -bfs/-dfs/-ids | Tavian Barnes | 2019-06-03 | 1 | -1/+5 |
| | |||||
* | parse: Pipe bfs -help to a pager when interactive | Tavian Barnes | 2019-05-31 | 1 | -3/+125 |
| | |||||
* | parse: Fix some line wrapping | Tavian Barnes | 2019-05-31 | 1 | -2/+2 |
| | |||||
* | Implement an iterative deepening mode (-ids) | Tavian Barnes | 2019-05-29 | 1 | -1/+5 |
| | |||||
* | Implement a depth-first mode (-dfs) | Tavian Barnes | 2019-05-28 | 1 | -0/+26 |
| | |||||
* | bftw: Visit multiple roots breadth-first | Tavian Barnes | 2019-05-28 | 1 | -24/+18 |
| | | | | This makes `bfs a b` treat `a` and `b` as siblings. | ||||
* | Add documentation for -xattr | Tavian Barnes | 2019-05-24 | 1 | -4/+8 |
| | |||||
* | Implement -xattr predicate | Tavian Barnes | 2019-05-24 | 1 | -0/+18 |
| | |||||
* | fsade: Refactor the POSIX.1e abstractions | Tavian Barnes | 2019-05-24 | 1 | -7/+5 |
| | | | | | | | Since we're going to want to abstract more things that aren't part of POSIX.1e (like xattrs) in a similar way, let's give this a more generic name. And while we're at it, give it some more precise error reporting, and add some tests. | ||||
* | stat: Get rid of bfs_fstat() | Tavian Barnes | 2019-05-04 | 1 | -1/+1 |
| | | | | We can just use bfs_stat() with a NULL at_path. | ||||
* | stat: Unify the flags arguments | Tavian Barnes | 2019-05-04 | 1 | -2/+2 |
| | |||||
* | Add support for the NO_COLOR environment variable | Tavian Barnes | 2019-04-27 | 1 | -4/+10 |
| | | | | C.f. https://no-color.org/ | ||||
* | parse: Add some missing costs/probabilities | Tavian Barnes | 2019-04-24 | 1 | -0/+4 |
| | | | | Previously we weren't re-ordering -type in front of -newerXY | ||||
* | parse: Allow things like -uid ++10 | Tavian Barnes | 2019-04-21 | 1 | -3/+9 |
| | | | | GNU find does too. | ||||
* | trie: Make trie_remove() take a leaf instead of a key | Tavian Barnes | 2019-04-20 | 1 | -2/+2 |
| | |||||
* | trie: Store void* values rather than const void* | Tavian Barnes | 2019-03-27 | 1 | -2/+2 |
| | | | | Fewer casts needed this way. | ||||
* | bftw: Work around d_type being wrong for bind mounts on Linux | Tavian Barnes | 2019-03-06 | 1 | -5/+8 |
| | | | | | | C.f. https://savannah.gnu.org/bugs/?54913 C.f. https://lkml.org/lkml/2019/2/11/2027 Fixes https://github.com/tavianator/bfs/issues/37 |