-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Switch to avoid crossing filesystem boundaries #321
Comments
This needs to be implemented in I agree with the naming choice. Using |
On Wed, Jan 18 2017, Andrew Gallant wrote:
I agree with the naming choice. Using find's flag name seems fine. It looks like GNU grep doesn't have
a similar flag?
Indeed it doesn't, which is a shame.
If you're working with FUSE and/or remote filesystems, -xdev is very
useful (either to avoid crossing, and/or to escape the local fs).
|
I think I'm liking the name Does anyone know the provenance of the name |
I suspect you're correct there, given that tools like
Also, I'm not so sure about |
In 2.11BSD
I think |
@okdana Ah nice, thanks! The prevalence of |
Another thing which just occurred to me is that I like the |
This commit adds a 'same_file_system' option to the walk builder. For single threaded walking, it defers to the walkdir crate, which has the same option. The bulk of this commit implements this flag for the parallel walker. We add one very feeble test for this. The parallel walker is now officially a complete mess. Closes #321
This commit adds a 'same_file_system' option to the walk builder. For single threaded walking, it defers to the walkdir crate, which has the same option. The bulk of this commit implements this flag for the parallel walker. We add one very feeble test for this. The parallel walker is now officially a complete mess. Closes #321
I know it's late to comment on this, but if I explicitly pass two directories on different devices to perform searches on:
I do expect rg to scan/descend on both, as these were given explicitly. In this sense, I really preferred the original term "same device" or "do not cross boundaries" (aka xdev) more than 'ag --one-device' as I originally pointed out, as "one" in this context is just a special case. This is just for the sake of discussion, I know the name has already been settled. |
It's often useful to search only files that reside on the same filesystem as the search paths, same as
find -xdev
orag --one-device
. I find ag's "one-device" switch to be misleading, as it's more correctly described by find as "do not cross filesystem boundaries", since the restriction applies to each search path in turn (which can span more than one device).The text was updated successfully, but these errors were encountered: