summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)Author
2017-08-10Release 1.1.11.1.1Tavian Barnes
2017-07-29exec: Fix more corner cases with -ok ... +Tavian Barnes
-ok should look for a ; even if it sees {} +, according to POSIX.
2017-07-29tests.sh: Add a --verbose modeTavian Barnes
2017-07-29exec: Don't allow anything between {} and +Tavian Barnes
POSIX explicitly forbids this extension: > Only a <plus-sign> that immediately follows an argument containing > only the two characters "{}" shall punctuate the end of the primary > expression. Other uses of the <plus-sign> shall not be treated as > special.
2017-07-29util: Define O_DIRECTORY to 0 if it's not already definedTavian Barnes
2017-07-27Re-license under the BSD Zero Clause LicenseTavian Barnes
2017-07-22Release 1.11.1Tavian Barnes
2017-07-21Represent never returning as always_true && always_falseTavian Barnes
Expressions that never return are vacuously always both true and false. Using this representation lets us take advantage of existing truth-based optimizations, which gets us optimizations of command lines like bfs -name foo -quit -print for free.
2017-07-21Fix a couple terrible optimizer bugsTavian Barnes
Just because an expression is always true or false, doesn't mean we can execute it more often than it otherwise would be, unless it's also pure. But that's equivalent to being identically -true/-false, so just check that.
2017-07-21Implement -printxTavian Barnes
Also from NetBSD.
2017-07-20main: Call setlocale() at startup to use the system localeTavian Barnes
2017-07-20eval: Add some sanity checksTavian Barnes
2017-07-20Implement -exit [STATUS]Tavian Barnes
From NetBSD again.
2017-07-20Implement -rm as an alias for -deleteTavian Barnes
From NetBSD.
2017-07-20Revert "tests.sh: Better line overwriting"Tavian Barnes
This reverts commit 4b02d5dae771a8797868ccaddf1bbb7cf0b67c2b. Overwriting the last line of the test output is worse.
2017-07-18tests.sh: Better line overwritingTavian Barnes
This way the cursor is always at the beginning of the line, so any error output is more readable.
2017-07-18tests.sh: Make closefrom() behave like its namesakeTavian Barnes
2017-07-16tests.sh: Close extraneous fds for tests that depend on ulimitTavian Barnes
2017-07-16parse: Ask for confirmation in some casesTavian Barnes
2017-07-15Handle yes/no prompts correctly according to the localeTavian Barnes
2017-07-09parse: Warn if -depth and -prune are used togetherTavian Barnes
2017-07-09Handle ENOTDIR the same as ENOENTTavian Barnes
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.
2017-07-09bftw: Rename and refactor the internalsTavian Barnes
2017-07-08bftw: Fix ENAMETOOLONG handling when the root is closedTavian Barnes
The root has depth == 0, but we still need to include it in the components array.
2017-07-08exec: Clear errno when a multi-exec doesn't failTavian Barnes
This fixes strange "Inappropriate ioctl for device" errors when using -exec ... + with output redirection. errno was set to ENOTTY by the isatty() call during startup for color auto-detection, and never cleared before eval_exec() wants to check if anything went wrong.
2017-07-08bftw: Recover from ENAMETOOLONGTavian Barnes
It is always possible to force a breadth-first traversal to encounter ENAMETOOLONG, regardless of the dircache eviction policy. As a concrete example, consider this directory structure: ./1/{NAME_MAX}/{NAME_MAX}/{NAME_MAX}/... (longer than {PATH_MAX}) ./2/{NAME_MAX}/{NAME_MAX}/{NAME_MAX}/... ./3/{NAME_MAX}/{NAME_MAX}/{NAME_MAX}/... ... (more than RLIMIT_NOFILE directories under .) Eventually, the next file to be processed will not have any parents in the cache, as the cache can only hold RLIMIT_NOFILE entries. Then the whole path must be traversed from ., which will exceed {PATH_MAX} bytes. Work around this by performing a component-by-component traversal manually when we see ENAMETOOLONG. This is required by POSIX: > The find utility shall be able to descend to arbitrary depths in a file > hierarchy and shall not fail due to path length limitations (unless a > path operand specified by the application exceeds {PATH_MAX} > requirements).
2017-07-08Revert "bftw: Don't store the terminating '\0' in dircache_entry names."Tavian Barnes
This reverts commit 20860becb5a0e89ee2aaaddbb0ba1eb248552640. The terminating NUL will be useful for the upcoming per-component traversal to handle ENAMETOOLONG.
2017-06-15Release 1.0.21.0.2Tavian Barnes
2017-06-15-perm: Handle permcopy (e.g. u=rw,g=u) correctlyTavian Barnes
2017-06-11tests: Fix test_printf_nul with non-GNU sortTavian Barnes
Other UNIX sort implementations seem to truncate at the nul bytes, so open-code it without the sort.
2017-06-10printf: Fix embedded nul bytesTavian Barnes
Fixes #26.
2017-06-03parse: Make some error messages redTavian Barnes
2017-06-03Add Homebrew installation instructionsPeter Brunner
2017-05-17Release 1.0.11.0.1Tavian Barnes
2017-05-17parse: Set always_true for some actions that never return falseTavian Barnes
2017-05-17bftw: Remove unused parameter to dircache_entry_base()Tavian Barnes
2017-05-15Add colors to -D treeTavian Barnes
2017-05-15Optimize based on reachability due to -quitTavian Barnes
2017-05-11Don't make -quit disable the implicit -printTavian Barnes
2017-05-09Implement -D execTavian Barnes
2017-05-06main: Fix error checking of redirect()Tavian Barnes
2017-04-30exec: Treat -1 from _SC_ARG_MAX as "unlimited"Tavian Barnes
2017-04-30mtab: Check __GLIBC__ instead of __linux__ for getmntent()Tavian Barnes
2017-04-30Pass AT_EACCESS to faccessat()Tavian Barnes
That's the form that actually answers the expected question ("can I open() this"), and the only form Hurd supports.
2017-04-30Don't forget an access mode to openat() in -emptyTavian Barnes
2017-04-29Don't parse the mount table until it's neededTavian Barnes
2017-04-29mtab: Don't hardcode /etc/mtabTavian Barnes
2017-04-29Add Debian installation instructions.Chris Lamb
2017-04-24Release 1.01.0Tavian Barnes
2017-04-23Implement -fstypeTavian Barnes
Fixes #6!