Age | Commit message (Collapse) | Author | |
---|---|---|---|
2019-03-06 | bftw: Work around d_type being wrong for bind mounts on Linux | Tavian Barnes | |
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 | |||
2019-03-06 | parse: Use a trie to hold currently open files | Tavian Barnes | |
2019-03-01 | Implement -unique | Tavian Barnes | |
Closes #48 | |||
2019-02-13 | parse: Wrap -help output at 80 chars | Tavian Barnes | |
2019-02-12 | Fix missing color escape ($) in the -help output | Tavian Barnes | |
2019-02-09 | Add some documentation comments | Tavian Barnes | |
2019-02-06 | Re-write the help/manpage | Tavian Barnes | |
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). | |||
2019-02-06 | parse: Treat -d as a flag, not an option | Tavian Barnes | |
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. | |||
2019-02-06 | parse: Add support for whiteouts in -type/-xtype | Tavian Barnes | |
FreeBSD find supports this. | |||
2019-02-06 | Fix -nouser/-nogroup error handling | Tavian Barnes | |
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. | |||
2019-02-01 | parse: Remove the recommendation to check find -help or man find | Tavian Barnes | |
bfs has had a comprehensive help text and man page for a while now. | |||
2019-01-11 | parse: Allow multiple comma-separated debug flags | Tavian Barnes | |
2019-01-03 | posix1e: Don't #include <sys/capability.h> on FreeBSD | Tavian Barnes | |
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. | |||
2019-01-02 | color: Check format strings + args for cfprintf() | Tavian Barnes | |
%{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. | |||
2019-01-02 | diag: Unify diagnostic formatting | Tavian Barnes | |
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. | |||
2018-12-30 | Hide unsupported options from -help | Tavian Barnes | |
2018-12-28 | parse: Handle argc == 0 | Tavian Barnes | |
Linux allows you to exec() with no argument list at all. Default to "bfs" in that case. | |||
2018-12-25 | stat: Provide a helper for getting human-readable field names | Tavian Barnes | |
And fix -newerXY if the Y time doesn't exist. | |||
2018-12-19 | parse: Fix probabilities when -types are duplicated | Tavian Barnes | |
-type f,f does not have more than a 100% probability of success. | |||
2018-12-19 | parse: Add cost info for -acl and -capable | Tavian Barnes | |
And set ephemeral_fds correctly too. | |||
2018-12-17 | Implement -acl test | Tavian Barnes | |
2018-12-17 | Add new -capable test | Tavian Barnes | |
2018-11-02 | parse: Use a better reference point for incomplete expression errors | Tavian Barnes | |
This makes `bfs -not type d` complain about nothing following the `-not` rather than the `d`. | |||
2018-11-02 | parse: Add support for -D all to enable all debug flags | Tavian Barnes | |
2018-11-02 | parse: Improve -D diagnostics | Tavian Barnes | |
2018-09-24 | Update copyright dates | Tavian Barnes | |
2018-08-16 | Add some missing fallthrough comments | Tavian Barnes | |
2018-07-06 | parse: Add some missing failure messages | Tavian Barnes | |
2018-06-18 | parse: Don't leave expr->mode_cmp uninitialized | Tavian Barnes | |
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 | |||
2018-01-20 | printf: Add %w and %Wk for file birth times | Tavian Barnes | |
%w and %W were chosen to match the format specifiers for file birth times from stat(1) | |||
2018-01-08 | stat: New wrapper around the stat() family | Tavian Barnes | |
This lets bfs transparently support the new statx() system call on Linux, giving it access to file birth times. | |||
2018-01-06 | parse: Minor cleanups from af7878c/7da0d28 | Tavian Barnes | |
2017-12-15 | Keep track of required FDs per-expr | Tavian Barnes | |
2017-11-13 | color: Implement %m for cfprintf() | Tavian Barnes | |
2017-11-12 | exec: Recover from E2BIG | Tavian Barnes | |
2017-11-12 | cmdline: Account for files opened during/between evaluations more carefully | Tavian Barnes | |
2017-11-05 | Add support for file birth/creation times on platforms that have it | Tavian Barnes | |
Fixes #19 | |||
2017-11-05 | parse: Support -perm +7777, for compatibility with BSD and old GNU find | Tavian Barnes | |
2017-10-21 | parse: Keep track of what files are already open | Tavian Barnes | |
Fixes #22 | |||
2017-10-21 | Report errors that occur when closing files | Tavian Barnes | |
Otherwise we miss write errors that occur when flushing the cache. | |||
2017-10-15 | Add a man page | Tavian Barnes | |
Fixes #31 | |||
2017-09-17 | parse: Document the bfs meaning of -O in -help | Tavian Barnes | |
2017-09-16 | opt: Separate optimization from parsing | Tavian Barnes | |
2017-09-06 | parse: Don't reorder or remove tests with potential side effects | Tavian Barnes | |
-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. | |||
2017-09-06 | parse: Factor out common initialization code for -print and friends | Tavian Barnes | |
2017-09-02 | Implement -D search | Tavian Barnes | |
2017-08-27 | Implement cost-based optimization | Tavian Barnes | |
2017-08-22 | Avoid multiple extra stat()s of broken symlinks for -xtype | Tavian Barnes | |
2017-08-12 | Unify broken symlink handling | Tavian Barnes | |
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. | |||
2017-08-10 | parse: Don't allow negative optimization levels | Tavian Barnes | |