summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2020-11-11Release 2.12.1Tavian Barnes
2020-11-11tests: Don't squelch stderr with --verboseTavian Barnes
2020-11-10tests: Test LS_COLORS extension lowercasingTavian Barnes
2020-11-10Makefile: New gcov targetTavian Barnes
2020-11-10opt: Assert that we don't do disabled optimizationsTavian Barnes
2020-11-10tests: Improve test coverage a bitTavian Barnes
2020-11-09tests: Add missing expectations from dd3bbb9Tavian Barnes
2020-11-09opt: Predicates aren't true when they're falseTavian Barnes
This unfortunate typo was mostly harmless; since the predicates were always assumed to be true, they wouldn't conflict. The exception is -user/-group, which set -nouser/-nogroup to false for users/groups that exist. Even -O0 wasn't enough to suppress the bug, due to a missing optlevel check fixed in the previous commit. Fixes: 305ee902874b49351f4916e303c293523f11570b
2020-11-09opt: Check optlevel before removing unreachable expressionsTavian Barnes
2020-11-09Use two newlines for all pre-eval warningsTavian Barnes
2020-11-04eval: Fix the status bar to only print the parent againTavian Barnes
2020-11-04eval: Make a crude attempt to handle double-width chars in the status barTavian Barnes
2020-11-04Enable -Wsign-compare to catch bugs like 726d7801Tavian Barnes
2020-11-04spawn: Fix error pipe write failure handlingTavian Barnes
A short history lesson: this code (from exec.c) used to just be write(...); In 649d85b, an empty if block was added to placate _FORTIFY_SOURCE's warn_unused_result: if (write(...) != sizeof(error)) { // ... } This is fine since the parent doesn't rely on receiving those writes (e.g. the child could die before writing), and the small write to a pipe won't fail anyway. But when bfs_spawn() was created, the implementation changed to this: while (write(...) < sizeof(error)); The while loop was presumably added to mirror musl's posix_spawn() implementation, which handles EINTR. But musl's is actually correct: while (write(...) < 0); whereas mine has a subtle bug: since sizeof(error) is unsigned, the bfs code did an unsigned comparison, meaning -1 from write() would *not* restart the loop. Fix it by comparing with 0 like musl, since short writes are impossible here. Perhaps it's time for -Wsign-compare, despite the other 18 instances being false positives.
2020-11-03Makefile: Fail early on sanitizer errorsTavian Barnes
2020-11-03New -status option to display a status barTavian Barnes
2020-11-03bar: Implement terminal status barsTavian Barnes
2020-11-03dstring: New dstrvprintf() functionTavian Barnes
2020-10-14Update the project URLTavian Barnes
2020-10-14Release 2.02.0Tavian Barnes
2020-10-13util: New BFS_FLEX_SIZEOF() macro for more precise flexible array allocationsTavian Barnes
See http://www.open-std.org/jtc1/sc22/wg14/www/docs/dr_282.htm for all the fun behind this.
2020-10-06pwcache: Adjust some naming conventionsTavian Barnes
2020-10-06mtab: Adjust some naming conventionsTavian Barnes
2020-10-06expr, eval: Clean up header dependenciesTavian Barnes
2020-10-06exec: Adjust some calling conventionsTavian Barnes
2020-10-06printf: Adjust some calling conventionsTavian Barnes
2020-10-06ctx: Don't include color.hTavian Barnes
2020-10-05diag: New bfs_perror() functionTavian Barnes
2020-10-04parse: Fail if -color is passed and the colors couldn't be parsedTavian Barnes
2020-10-04parse: More accurate error reporting for cfdup()Tavian Barnes
2020-10-04parse: Report errors when failing to add a rootTavian Barnes
2020-10-04diag: Factor debug_flag string conversion into its own functionTavian Barnes
2020-10-01time: Don't call tzset() on every x{local,gm}time()Tavian Barnes
It turns out tzset() checks /etc/localtime every time you call it.
2020-10-01dstring: Try to avoid calling vsnprintf() twice in dstrprintf()Tavian Barnes
2020-10-01main: Preserve errno over close() in redirect()Tavian Barnes
2020-10-01util: Move redirect() and isopen() to main.cTavian Barnes
2020-09-30util: Don't rely on bftwTavian Barnes
And rename format_mode() to xstrmode() while I'm at it.
2020-09-28ctx: Perserve errno better in bfs_ctx_open()Tavian Barnes
2020-09-27Rename struct cmdline to bfs_ctxTavian Barnes
The API remains similar, with some added accessor functions for lazy initialization of the pwcache and mtab.
2020-09-23exec: Output a human-readable description of terminating signalsTavian Barnes
2020-09-20bftw: Fix bftw_cached_stat() with BFS_STAT_TRYFOLLOWTavian Barnes
2020-09-20tests: Add missing ground truthTavian Barnes
2020-09-20printf: Format the empty string for %l of non-linksTavian Barnes
It makes a difference if the format specifier has a width.
2020-09-18stat: Rename bfs_stat_flag to _flagsTavian Barnes
Flags enums should be plural.
2020-09-18Don't call stat() just to determine symbolic lengthsTavian Barnes
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.
2020-09-18util: Make the initial allocation bigger for xreadlinkat()Tavian Barnes
Most symlinks are more than 1 character long, so rather than wasting time with 1, 2, 4, ... when we don't have a good guess for the length, start with a bigger one. Credit to https://twitter.com/RichFelker/status/1306321019108556806 for reminding me of this.
2020-09-02pwcache: Fix an invalid free if strdup()ing the group name failsTavian Barnes
2020-08-13pwcache: Work around gr_mem being misaligned on macOSTavian Barnes
C.f. https://github.com/php/php-src/commit/d80f0ff6c0a557d8c993a9d2bd006fb488f6d564
2020-08-13Implement -xattrnameTavian Barnes
From macOS find.
2020-07-29bftw: Make some flag names more explicitTavian Barnes