Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Enable -Wimplicit-fallthrough | Tavian Barnes | 2021-06-02 | 1 | -1/+1 |
| | |||||
* | Update copyright dates | Tavian Barnes | 2021-02-05 | 1 | -1/+1 |
| | |||||
* | dir: New DIR* facade | Tavian Barnes | 2021-01-28 | 1 | -12/+13 |
| | |||||
* | Include what I use | Tavian Barnes | 2020-11-12 | 1 | -3/+3 |
| | | | | Thanks to https://github.com/include-what-you-use/include-what-you-use | ||||
* | Enable -Wsign-compare to catch bugs like 726d7801 | Tavian Barnes | 2020-11-04 | 1 | -2/+2 |
| | |||||
* | printf: Adjust some calling conventions | Tavian Barnes | 2020-10-06 | 1 | -9/+9 |
| | |||||
* | diag: New bfs_perror() function | Tavian Barnes | 2020-10-05 | 1 | -13/+13 |
| | |||||
* | 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 | -20/+20 |
| | | | | | The API remains similar, with some added accessor functions for lazy initialization of the pwcache and mtab. | ||||
* | printf: Format the empty string for %l of non-links | Tavian Barnes | 2020-09-20 | 1 | -9/+10 |
| | | | | It makes a difference if the format specifier has a width. | ||||
* | Don't call stat() just to determine symbolic lengths | Tavian Barnes | 2020-09-18 | 1 | -1/+4 |
| | | | | | | | 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. | ||||
* | bftw: Rename bftw_typeflag to bftw_type, and make it not a bitmask | Tavian Barnes | 2020-07-29 | 1 | -6/+6 |
| | |||||
* | 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 | -7/+20 |
| | | | | | | | | | | | | | | | | | | | | | | 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' | ||||
* | time: Split out time-related functions from util | Tavian Barnes | 2020-02-13 | 1 | -0/+1 |
| | |||||
* | bftw: Pass a const struct BFTW * to the callback | Tavian Barnes | 2019-05-05 | 1 | -29/+29 |
| | |||||
* | bftw: Add a caching stat() API to struct BFTW | Tavian Barnes | 2019-05-04 | 1 | -133/+172 |
| | |||||
* | stat: Unify the flags arguments | Tavian Barnes | 2019-05-04 | 1 | -1/+1 |
| | |||||
* | Release 1.41.4 | Tavian Barnes | 2019-04-15 | 1 | -1/+1 |
| | |||||
* | bftw: Work around d_type being wrong for bind mounts on Linux | Tavian Barnes | 2019-03-06 | 1 | -5/+2 |
| | | | | | | 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 | ||||
* | Turn on -Wstrict-prototypes | Tavian Barnes | 2019-02-06 | 1 | -1/+1 |
| | |||||
* | diag: Unify diagnostic formatting | Tavian Barnes | 2019-01-02 | 1 | -16/+10 |
| | | | | | | 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. | ||||
* | stat: Unify bfs_stat_time() implementations | Tavian Barnes | 2018-12-20 | 1 | -26/+2 |
| | |||||
* | bftw: Move bftw_typeflag conversion out of util | Tavian Barnes | 2018-12-17 | 1 | -1/+1 |
| | | | | Turns out incomplete enum types are a GNU C extension. | ||||
* | Update copyright dates | Tavian Barnes | 2018-09-24 | 1 | -1/+1 |
| | |||||
* | Add some missing fallthrough comments | Tavian Barnes | 2018-08-16 | 1 | -0/+1 |
| | |||||
* | printf: Support all standard strftime() directives | Tavian Barnes | 2018-07-24 | 1 | -10/+20 |
| | |||||
* | printf: Support %B, GNU find's undocumented birth time specifier | Tavian Barnes | 2018-07-24 | 1 | -5/+6 |
| | |||||
* | stat: Don't assume blocks are 512 bytes | Tavian Barnes | 2018-07-24 | 1 | -3/+11 |
| | | | | | | | | | | | | POSIX says > The unit for the st_blocks member of the stat structure is not defined > within POSIX.1‐2008. and recommends using DEV_BSIZE from <sys/param.h> if available. Also, for -printf '%S', print 1 instead of NaN for empty files with no blocks. | ||||
* | printf: Output ? for errors in %Y | Tavian Barnes | 2018-07-20 | 1 | -5/+16 |
| | |||||
* | printf: Add %w and %Wk for file birth times | Tavian Barnes | 2018-01-20 | 1 | -0/+9 |
| | | | | | %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 | -42/+50 |
| | | | | | This lets bfs transparently support the new statx() system call on Linux, giving it access to file birth times. | ||||
* | color: Implement %m for cfprintf() | Tavian Barnes | 2017-11-13 | 1 | -1/+1 |
| | |||||
* | Add support for file birth/creation times on platforms that have it | Tavian Barnes | 2017-11-05 | 1 | -3/+9 |
| | | | | Fixes #19 | ||||
* | opt: Separate optimization from parsing | Tavian Barnes | 2017-09-16 | 1 | -1/+2 |
| | |||||
* | printf: Save some lines in time specifier parsing | Tavian Barnes | 2017-08-27 | 1 | -36/+4 |
| | |||||
* | Re-license under the BSD Zero Clause License | Tavian Barnes | 2017-07-27 | 1 | -10/+15 |
| | |||||
* | Handle ENOTDIR the same as ENOENT | Tavian Barnes | 2017-07-09 | 1 | -0/+1 |
| | | | | | | For a/b/c, ENOTDIR is returned instead of ENOENT if a or b are not directories. Handle this uniformly when detecting broken symlinks, readdir races, etc. | ||||
* | printf: Fix embedded nul bytes | Tavian Barnes | 2017-06-10 | 1 | -11/+16 |
| | | | | Fixes #26. | ||||
* | Don't parse the mount table until it's needed | Tavian Barnes | 2017-04-29 | 1 | -3/+6 |
| | |||||
* | Implement -fstype | Tavian Barnes | 2017-04-23 | 1 | -1/+22 |
| | | | | Fixes #6! | ||||
* | Move bftw_typeflag converters to util.c | Tavian Barnes | 2017-04-08 | 1 | -1/+1 |
| | |||||
* | Implement -ls and -fls | Tavian Barnes | 2017-03-11 | 1 | -91/+28 |
| | |||||
* | Make a printf()-style API for colored messages | Tavian Barnes | 2017-03-11 | 1 | -25/+14 |
| | |||||
* | Implement -printf %Ak, %Ck, and %Tk | Tavian Barnes | 2017-03-11 | 1 | -89/+231 |
| | |||||
* | bftw: Make the nameoff of "///" point to "/" | Tavian Barnes | 2017-02-09 | 1 | -0/+4 |
| | | | | This simplifies a few things such as -name handling for ///. | ||||
* | Add support for -x?type with multiple types | Tavian Barnes | 2017-02-08 | 1 | -64/+16 |
| | | | | This functionality is already part of GNU findutils git. | ||||
* | Add some missing perror() calls | Tavian Barnes | 2017-02-07 | 1 | -0/+5 |
| | |||||
* | Fix a memory leak parsing -printf | Tavian Barnes | 2017-02-06 | 1 | -0/+1 |
| | |||||
* | Implement -printf/-fprintf | Tavian Barnes | 2017-02-05 | 1 | -0/+768 |
Based on a patch by Fangrui Song <i@maskray.me>. Closes #16. |