Rename `--same-file-system` to `--one-file-system`
Before adoption: this commit came in with the history the project adopted, so no landing records it.
authored by Simon Engmann · committed by David Peter · parent 3e0325c · Browse files · 6 files·+21 added−21 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
6 files+21 added−21 removed
- tests:+2 added−2 removed
- other:+19 added−19 removed
Provenance
- Commit
94993ca- Tree
57ccdfd- Author
Simon Engmann <simon.engmann@tu-dortmund.de>- Committer
David Peter <sharkdp@users.noreply.github.com>- Parent
3e0325c
6 files changed+21 added−21 removed
modified:src/internal/opts.rs+1 added-1 removed
27 unmodified lines28 /// Whether to follow symlinks or not.29 pub follow_links: bool,30 31 /// Whether to limit the search to starting file system or not.32- pub same_file_system: bool,32+ pub one_file_system: bool,33 34 /// Whether elements of output should be separated by a null character35 pub null_separator: bool,36 48 unmodified linesmodified:src/app.rs+2 added-2 removed
113 unmodified lines114 .short("L")115 .alias("dereference")116 .overrides_with("follow"),117 )118- .arg(arg("same-file-system").long("same-file-system"))118+ .arg(arg("one-file-system").long("one-file-system"))119 .arg(120 arg("full-path")121 .long("full-path")122 .short("p")206 unmodified lines329 doc!(h, "follow"330 , "Follow symbolic links"331 , "By default, fd does not descend into symlinked directories. Using this flag, symbolic \332 links are also traversed.");333- doc!(h, "same-file-system"333+ doc!(h, "one-file-system"334 , "Don't cross file system boundaries (only Unix/Windows)"335 , "By default, fd will traverse the file system tree as far as other options dictate. \336 With this flag, fd ensures that it does not descend into a different file system than \337 the one it started in. Does nothing if not on Unix or Windows.");130 unmodified linesmodified:src/main.rs+1 added-1 removed
206 unmodified lines207 read_vcsignore: !(matches.is_present("no-ignore")208 || matches.is_present("rg-alias-hidden-ignore")209 || matches.is_present("no-ignore-vcs")),210 follow_links: matches.is_present("follow"),211- same_file_system: matches.is_present("same-file-system"),211+ one_file_system: matches.is_present("one-file-system"),212 null_separator: matches.is_present("null_separator"),213 max_depth: matches214 .value_of("depth")215 .or_else(|| matches.value_of("rg-depth"))86 unmodified linesmodified:src/walk.rs+1 added-1 removed
77 unmodified lines78 .git_exclude(config.read_vcsignore)79 .overrides(overrides)80 .follow_links(config.follow_links)81 // Same file system is only supported on Unix and Windows platforms82- .same_file_system(config.same_file_system && (cfg!(unix) || cfg!(windows)))82+ .same_file_system(config.one_file_system && (cfg!(unix) || cfg!(windows)))83 .max_depth(config.max_depth);84 85 if config.read_fdignore {86 walker.add_custom_ignore_filename(".fdignore");302 unmodified linesmodified:tests/tests.rs+2 added-2 removed
553 unmodified lines554 symlink/C.Foo2",555 );556 }557 558-// File system boundaries (--same-file-system)558+// File system boundaries (--one-file-system)559 // Limited to Unix because, to the best of my knowledge, there is no easy way to test a use case560 // file systems mounted into the tree on Windows.561 // Not limiting depth causes massive delay under Darwin, see BurntSushi/ripgrep#1429562 #[test]8 unmodified lines571 "/dev/null",572 );573 te.assert_output(574 &[575- "--same-file-system",575+ "--one-file-system",576 "--full-path",577 "--max-depth",578 "2",579 "^/dev/null$",851 unmodified linesmodified:README.md+14 added-14 removed
283 unmodified lines284 USAGE:285 fd [FLAGS/OPTIONS] [<pattern>] [<path>...]286 287 FLAGS:288- -H, --hidden Search hidden files and directories289- -I, --no-ignore Do not respect .(git|fd)ignore files290- --no-ignore-vcs Do not respect .gitignore files291- -s, --case-sensitive Case-sensitive search (default: smart case)292- -i, --ignore-case Case-insensitive search (default: smart case)293- -g, --glob Glob-based search (default: regular expression)294- -F, --fixed-strings Treat the pattern as a literal string295- -a, --absolute-path Show absolute instead of relative paths296- -L, --follow Follow symbolic links297- --same-file-system Don't cross file system boundaries (only Unix/Windows)298- -p, --full-path Search full path (default: file-/dirname only)299- -0, --print0 Separate results by the null character300- -h, --help Prints help information301- -V, --version Prints version information288+ -H, --hidden Search hidden files and directories289+ -I, --no-ignore Do not respect .(git|fd)ignore files290+ --no-ignore-vcs Do not respect .gitignore files291+ -s, --case-sensitive Case-sensitive search (default: smart case)292+ -i, --ignore-case Case-insensitive search (default: smart case)293+ -g, --glob Glob-based search (default: regular expression)294+ -F, --fixed-strings Treat the pattern as a literal string295+ -a, --absolute-path Show absolute instead of relative paths296+ -L, --follow Follow symbolic links297+ --one-file-system Don't cross file system boundaries (only Unix/Windows)298+ -p, --full-path Search full path (default: file-/dirname only)299+ -0, --print0 Separate results by the null character300+ -h, --help Prints help information301+ -V, --version Prints version information302 303 OPTIONS:304 -d, --max-depth <depth> Set maximum search depth (default: none)305 -t, --type <filetype>... Filter by type: file (f), directory (d), symlink (l),242 unmodified lines