Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Source / Include Folder (#88) | トトも | 2022-04-16 | 1 | -1494/+0 |
| | | | Moved Source Files Into `src` Folder | ||||
* | bftw: New BFTW_BUFFER flag | Tavian Barnes | 2022-04-15 | 1 | -2/+2 |
| | |||||
* | bftw: Fix open FD accounting | Tavian Barnes | 2022-03-09 | 1 | -3/+2 |
| | | | | | Due to the introduction of bfs_dir, we don't need to reserve an extra file descriptor for the currently open directory. | ||||
* | bftw: Keep root paths at the head of the LRU list | Tavian Barnes | 2022-03-09 | 1 | -4/+25 |
| | | | | | With a low ulimit -n, this brings performance back in line with the old heap based implementation. | ||||
* | bftw: Bring back the LRU list | Tavian Barnes | 2022-03-09 | 1 | -158/+78 |
| | |||||
* | bftw: Use a dynamic array for the cache | Tavian Barnes | 2022-01-18 | 1 | -45/+42 |
| | | | | | | | Since commit 69a5227 ("eval: Raise RLIMIT_NOFILE if possible"), bfs can pass a large nopenfd (e.g. 512K) to bftw() by default. This resulted in a large up-front allocation even for small trees. Change it to grow on demand, lowering the footprint for small searches. | ||||
* | util: New close() wrappers to check for EBADF and preserve errno | Tavian Barnes | 2022-01-18 | 1 | -2/+2 |
| | |||||
* | bftw: Fix bftw_type() for broken links and BFS_STAT_FOLLOW | Tavian Barnes | 2021-03-10 | 1 | -4/+12 |
| | | | | This fixes link target coloring for broken links with -L. | ||||
* | Update copyright dates | Tavian Barnes | 2021-02-05 | 1 | -1/+1 |
| | |||||
* | bftw: Share the fd between the cache and open bfs_dir | Tavian Barnes | 2021-01-29 | 1 | -38/+27 |
| | | | | | | This avoids many dup()s. On Linux, we can completely avoid needing to dup() directory fds. On non-Linux, we only dup() when there are unexplored subdirectories. | ||||
* | dir: New DIR* facade | Tavian Barnes | 2021-01-28 | 1 | -140/+48 |
| | |||||
* | bftw: Get rid of bftw_reader | Tavian Barnes | 2021-01-28 | 1 | -98/+64 |
| | |||||
* | bftw: Avoid allocating when handling ENAMETOOLONG | Tavian Barnes | 2021-01-28 | 1 | -52/+30 |
| | |||||
* | bftw: Allow for NULL base when recovering from EMFILE | Tavian Barnes | 2021-01-28 | 1 | -1/+1 |
| | |||||
* | Include what I use | Tavian Barnes | 2020-11-12 | 1 | -2/+2 |
| | | | | 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 | -1/+1 |
| | |||||
* | util: New BFS_FLEX_SIZEOF() macro for more precise flexible array allocations | Tavian Barnes | 2020-10-13 | 1 | -1/+1 |
| | | | | | See http://www.open-std.org/jtc1/sc22/wg14/www/docs/dr_282.htm for all the fun behind this. | ||||
* | bftw: Fix bftw_cached_stat() with BFS_STAT_TRYFOLLOW | Tavian Barnes | 2020-09-20 | 1 | -1/+5 |
| | |||||
* | stat: Rename bfs_stat_flag to _flags | Tavian Barnes | 2020-09-18 | 1 | -4/+4 |
| | | | | Flags enums should be plural. | ||||
* | Don't call stat() just to determine symbolic lengths | Tavian Barnes | 2020-09-18 | 1 | -0/+8 |
| | | | | | | | 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: Make some flag names more explicit | Tavian Barnes | 2020-07-29 | 1 | -10/+10 |
| | |||||
* | bftw: Rename bftw_typeflag to bftw_type, and make it not a bitmask | Tavian Barnes | 2020-07-29 | 1 | -27/+27 |
| | |||||
* | Implement exponential deepening search | Tavian Barnes | 2020-06-16 | 1 | -12/+61 |
| | |||||
* | bftw: Factor out some of the iterative deepening harness | Tavian Barnes | 2020-06-12 | 1 | -39/+65 |
| | |||||
* | bftw: Only do another level of deepening if there are unexplored directories | Tavian Barnes | 2020-06-12 | 1 | -3/+4 |
| | | | | This makes -S ids about 20% faster on a checkout of the Linux kernel. | ||||
* | bftw: Make iterative deepening actually do depth-first search | Tavian Barnes | 2020-06-12 | 1 | -15/+21 |
| | | | | | | | | | bftw_stream() was always pushing to the end of the queue, resulting in breadth-first behaviour even when BFTW_DFS was set. This made iterative deepening a "worst of both worlds" with the same memory use as BFS, but much slower due to re-traversals. Fix it by re-using bftw_batch_{start,finish} from bftw_batch(). | ||||
* | Implement -s flag from FreeBSD find to sort results | Tavian Barnes | 2020-03-21 | 1 | -3/+80 |
| | |||||
* | bftw: Use a two-star approach to the bftw_queue linked list | Tavian Barnes | 2020-03-20 | 1 | -58/+28 |
| | |||||
* | bftw: Avoid shadowing a variable | Tavian Barnes | 2019-11-01 | 1 | -5/+2 |
| | |||||
* | mtab: Rename maybe_mount to might_be_mount | Tavian Barnes | 2019-08-29 | 1 | -1/+1 |
| | |||||
* | Make -mount and -xdev do different things | Tavian Barnes | 2019-07-04 | 1 | -14/+25 |
| | | | | | | | | | POSIX now says -mount should skip the whole mount point, while -xdev should only skip its descendents. C.f. http://austingroupbugs.net/view.php?id=1133 C.f. https://savannah.gnu.org/bugs/?42318 C.f. https://savannah.gnu.org/bugs/?54745 | ||||
* | bftw: Track the root bftw_file, not just the path | Tavian Barnes | 2019-07-04 | 1 | -8/+7 |
| | |||||
* | bftw: Use a flags enum rather than two bools for bftw_release_*() | Tavian Barnes | 2019-07-03 | 1 | -24/+33 |
| | |||||
* | bftw: Remove a dead assignment | Tavian Barnes | 2019-06-27 | 1 | -1/+0 |
| | |||||
* | bftw: Only rebuild the part of the path that changes | Tavian Barnes | 2019-06-25 | 1 | -24/+42 |
| | | | | | | This is a re-introduction of 998ba6f, which was reverted by the introduction of bftw_reader in 68ae5d0. It's particularly relevant for depth-first searches now that we queue each file before visiting it. | ||||
* | bftw: Queue individual files in depth-first mode | Tavian Barnes | 2019-06-25 | 1 | -79/+150 |
| | | | | This makes the order be truly depth-first. | ||||
* | bftw: Don't store bftw_file in bftw_reader | Tavian Barnes | 2019-06-25 | 1 | -69/+72 |
| | |||||
* | bftw: Remove BFTW_SKIP_SIBLINGS | Tavian Barnes | 2019-06-25 | 1 | -24/+11 |
| | | | | | It's not used by bfs, and it's difficult to support in all search strategies. | ||||
* | bftw: Rename bftw_dir to bftw_file | Tavian Barnes | 2019-06-25 | 1 | -214/+213 |
| | |||||
* | bftw: Don't store trailing slashes in bftw_dir names | Tavian Barnes | 2019-06-25 | 1 | -27/+23 |
| | |||||
* | util: Filter out . and .. in xreaddir() | Tavian Barnes | 2019-06-25 | 1 | -3/+0 |
| | |||||
* | Implement an iterative deepening mode (-ids) | Tavian Barnes | 2019-05-29 | 1 | -0/+132 |
| | |||||
* | Implement a depth-first mode (-dfs) | Tavian Barnes | 2019-05-28 | 1 | -10/+113 |
| | |||||
* | bftw: Visit multiple roots breadth-first | Tavian Barnes | 2019-05-28 | 1 | -19/+25 |
| | | | | This makes `bfs a b` treat `a` and `b` as siblings. | ||||
* | bftw: Refactor the implementation a bit | Tavian Barnes | 2019-05-28 | 1 | -218/+180 |
| | |||||
* | bftw: Take dir->{dev,ino} from the right stat buffer | Tavian Barnes | 2019-05-23 | 1 | -1/+1 |
| | | | | I don't think this can cause any observable bugs, but it's still wrong. | ||||
* | bftw: Pass a const struct BFTW * to the callback | Tavian Barnes | 2019-05-05 | 1 | -30/+31 |
| | |||||
* | bftw: Add a caching stat() API to struct BFTW | Tavian Barnes | 2019-05-04 | 1 | -20/+75 |
| | |||||
* | stat: Unify the flags arguments | Tavian Barnes | 2019-05-04 | 1 | -4/+4 |
| | |||||
* | Release 1.41.4 | Tavian Barnes | 2019-04-15 | 1 | -1/+1 |
| |