Commit message (Collapse) | Author | Age | Files | Lines | ||
---|---|---|---|---|---|---|
... | ||||||
* | 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 | |||||
* | parse: Use a trie to hold currently open files | Tavian Barnes | 2019-03-06 | 1 | -21/+18 | |
| | ||||||
* | Implement -unique | Tavian Barnes | 2019-03-01 | 1 | -3/+23 | |
| | | | | Closes #48 | |||||
* | parse: Wrap -help output at 80 chars | Tavian Barnes | 2019-02-13 | 1 | -3/+4 | |
| | ||||||
* | Fix missing color escape ($) in the -help output | Tavian Barnes | 2019-02-12 | 1 | -1/+1 | |
| | ||||||
* | Add some documentation comments | Tavian Barnes | 2019-02-09 | 1 | -0/+7 | |
| | ||||||
* | Re-write the help/manpage | Tavian Barnes | 2019-02-06 | 1 | -164/+125 | |
| | | | | | | I'm not sure people care very much whether the functionality they're looking up originated in POSIX/BSD/GNU find (and if they do, they can check those docs). | |||||
* | parse: Treat -d as a flag, not an option | Tavian Barnes | 2019-02-06 | 1 | -2/+2 | |
| | | | | | | This is consistent with BSD find, not with GNU find. But the GNU find feature was an (incorrect) attempt to be compatible with BSD find anyway. | |||||
* | parse: Add support for whiteouts in -type/-xtype | Tavian Barnes | 2019-02-06 | 1 | -0/+4 | |
| | | | | FreeBSD find supports this. | |||||
* | Fix -nouser/-nogroup error handling | Tavian Barnes | 2019-02-06 | 1 | -0/+2 | |
| | | | | | | | | | | The proper way to check for nonexistent users/groups is to set errno to 0 before the get{grg,pwu}id() call, and check it afterwards. On doing this, it becomes obvious that the call can fail if bftw() is using all the available FDs, so give them some ephemeral FDs. It would be ideal to read the user/group table only once, but this fixes the bug for now. | |||||
* | parse: Remove the recommendation to check find -help or man find | Tavian Barnes | 2019-02-01 | 1 | -6/+3 | |
| | | | | bfs has had a comprehensive help text and man page for a while now. | |||||
* | parse: Allow multiple comma-separated debug flags | Tavian Barnes | 2019-01-11 | 1 | -46/+81 | |
| | ||||||
* | posix1e: Don't #include <sys/capability.h> on FreeBSD | Tavian Barnes | 2019-01-03 | 1 | -0/+1 | |
| | | | | | | | | The file is there by default, but deprecated and not a POSIX.1E implementation. While I'm at it, move the logic to posix1e.h so other files aren't burdened with an extra include. Fixes the other half of #40. | |||||
* | color: Check format strings + args for cfprintf() | Tavian Barnes | 2019-01-02 | 1 | -219/+221 | |
| | | | | | | %{cc} is now ${cc} to avoid warnings about an unrecognized format specifier, and %P and %L are now %pP and %pL to make them look more like standard format strings. | |||||
* | diag: Unify diagnostic formatting | Tavian Barnes | 2019-01-02 | 1 | -67/+70 | |
| | | | | | | This adds a bfs: prefix to error/warning messages for consistency with other command line tools, and leaves only the "error:"/"warning:" part colored like GCC. It also uniformly adds full stops after messages. | |||||
* | Hide unsupported options from -help | Tavian Barnes | 2018-12-30 | 1 | -0/+6 | |
| | ||||||
* | parse: Handle argc == 0 | Tavian Barnes | 2018-12-28 | 1 | -0/+6 | |
| | | | | | Linux allows you to exec() with no argument list at all. Default to "bfs" in that case. | |||||
* | stat: Provide a helper for getting human-readable field names | Tavian Barnes | 2018-12-25 | 1 | -37/+30 | |
| | | | | And fix -newerXY if the Y time doesn't exist. | |||||
* | parse: Fix probabilities when -types are duplicated | Tavian Barnes | 2018-12-19 | 1 | -16/+24 | |
| | | | | -type f,f does not have more than a 100% probability of success. | |||||
* | parse: Add cost info for -acl and -capable | Tavian Barnes | 2018-12-19 | 1 | -2/+6 | |
| | | | | And set ephemeral_fds correctly too. | |||||
* | Implement -acl test | Tavian Barnes | 2018-12-17 | 1 | -0/+19 | |
| | ||||||
* | Add new -capable test | Tavian Barnes | 2018-12-17 | 1 | -0/+20 | |
| | ||||||
* | parse: Use a better reference point for incomplete expression errors | Tavian Barnes | 2018-11-02 | 1 | -1/+8 | |
| | | | | | This makes `bfs -not type d` complain about nothing following the `-not` rather than the `d`. | |||||
* | parse: Add support for -D all to enable all debug flags | Tavian Barnes | 2018-11-02 | 1 | -0/+3 | |
| | ||||||
* | parse: Improve -D diagnostics | Tavian Barnes | 2018-11-02 | 1 | -12/+26 | |
| | ||||||
* | Update copyright dates | Tavian Barnes | 2018-09-24 | 1 | -1/+1 | |
| | ||||||
* | Add some missing fallthrough comments | Tavian Barnes | 2018-08-16 | 1 | -0/+1 | |
| | ||||||
* | parse: Add some missing failure messages | Tavian Barnes | 2018-07-06 | 1 | -0/+2 | |
| | ||||||
* | parse: Don't leave expr->mode_cmp uninitialized | Tavian Barnes | 2018-06-18 | 1 | -1/+1 | |
| | | | | | | | | | When adding support for -perm +7777, I introduced an unconditional break that should have been conditional. The bug was observable with $ ./tests.sh --verbose --bfs="valgrind $PWD/bfs" test_perm_leading_plus_symbolic Fixes: 7f8bacca4c2b1d35bb65ddf8cbf70fadf1adf66e | |||||
* | printf: Add %w and %Wk for file birth times | Tavian Barnes | 2018-01-20 | 1 | -1/+6 | |
| | | | | | %w and %W were chosen to match the format specifiers for file birth times from stat(1) | |||||
* | stat: New wrapper around the stat() family | Tavian Barnes | 2018-01-08 | 1 | -64/+45 | |
| | | | | | This lets bfs transparently support the new statx() system call on Linux, giving it access to file birth times. | |||||
* | parse: Minor cleanups from af7878c/7da0d28 | Tavian Barnes | 2018-01-06 | 1 | -6/+2 | |
| | ||||||
* | Keep track of required FDs per-expr | Tavian Barnes | 2017-12-15 | 1 | -11/+14 | |
| | ||||||
* | color: Implement %m for cfprintf() | Tavian Barnes | 2017-11-13 | 1 | -6/+6 | |
| | ||||||
* | exec: Recover from E2BIG | Tavian Barnes | 2017-11-12 | 1 | -2/+6 | |
| | ||||||
* | cmdline: Account for files opened during/between evaluations more carefully | Tavian Barnes | 2017-11-12 | 1 | -7/+21 | |
| | ||||||
* | Add support for file birth/creation times on platforms that have it | Tavian Barnes | 2017-11-05 | 1 | -34/+71 | |
| | | | | Fixes #19 | |||||
* | parse: Support -perm +7777, for compatibility with BSD and old GNU find | Tavian Barnes | 2017-11-05 | 1 | -0/+6 | |
| | ||||||
* | parse: Keep track of what files are already open | Tavian Barnes | 2017-10-21 | 1 | -40/+99 | |
| | | | | Fixes #22 | |||||
* | Report errors that occur when closing files | Tavian Barnes | 2017-10-21 | 1 | -7/+30 | |
| | | | | Otherwise we miss write errors that occur when flushing the cache. | |||||
* | Add a man page | Tavian Barnes | 2017-10-15 | 1 | -15/+22 | |
| | | | | Fixes #31 | |||||
* | parse: Document the bfs meaning of -O in -help | Tavian Barnes | 2017-09-17 | 1 | -2/+15 | |
| | ||||||
* | opt: Separate optimization from parsing | Tavian Barnes | 2017-09-16 | 1 | -328/+19 | |
| | ||||||
* | parse: Don't reorder or remove tests with potential side effects | Tavian Barnes | 2017-09-06 | 1 | -3/+21 | |
| | | | | | | -empty and -xtype may have side effects like reporting permission errors, which even affect the exit status of bfs. We shouldn't remove these effects without -Ofast. | |||||
* | parse: Factor out common initialization code for -print and friends | Tavian Barnes | 2017-09-06 | 1 | -35/+30 | |
| | ||||||
* | Implement -D search | Tavian Barnes | 2017-09-02 | 1 | -0/+3 | |
| | ||||||
* | Implement cost-based optimization | Tavian Barnes | 2017-08-27 | 1 | -43/+210 | |
| | ||||||
* | Avoid multiple extra stat()s of broken symlinks for -xtype | Tavian Barnes | 2017-08-22 | 1 | -1/+1 | |
| | ||||||
* | Unify broken symlink handling | Tavian Barnes | 2017-08-12 | 1 | -1/+1 | |
| | | | | | | | | | Rather than open-code the fallback logic for broken symlinks everywhere it's needed, introduce a new xfstatat() utility function that performs the fallback automatically. Using xfstatat() consistently fixes a few bugs, including cases where broken symlinks are given as arguments to predicates like -samefile. | |||||
* | parse: Don't allow negative optimization levels | Tavian Barnes | 2017-08-10 | 1 | -1/+1 | |
| |